Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for break (0.18 sec)

  1. scan.go

    					// same nested structure
    					if _, ok := joinedNestedSchemaMap[fullRelsName]; !ok {
    						if value := reflect.ValueOf(values[idx]).Elem(); value.Kind() == reflect.Ptr && value.IsNil() {
    							isNilPtrValue = true
    							break
    						}
    
    						relValue.Set(reflect.New(relValue.Type().Elem()))
    						joinedNestedSchemaMap[fullRelsName] = nil
    					}
    				}
    				currentReflectValue = relValue
    			}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Apr 26 09:53:11 GMT 2024
    - 9.8K bytes
    - Viewed (0)
  2. clause/expression.go

    	switch len(in.Values) {
    	case 0:
    		builder.WriteString(" IN (NULL)")
    	case 1:
    		if _, ok := in.Values[0].([]interface{}); !ok {
    			builder.WriteString(" = ")
    			builder.AddVar(builder, in.Values[0])
    			break
    		}
    
    		fallthrough
    	default:
    		builder.WriteString(" IN (")
    		builder.AddVar(builder, in.Values...)
    		builder.WriteByte(')')
    	}
    }
    
    func (in IN) NegationBuild(builder Builder) {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Oct 10 06:45:48 GMT 2023
    - 8.3K bytes
    - Viewed (0)
  3. soft_delete.go

    					if orCond, ok := expr.(clause.OrConditions); ok && len(orCond.Exprs) == 1 {
    						where.Exprs = []clause.Expression{clause.And(where.Exprs...)}
    						c.Expression = where
    						stmt.Clauses["WHERE"] = c
    						break
    					}
    				}
    			}
    		}
    
    		stmt.AddClause(clause.Where{Exprs: []clause.Expression{
    			clause.Eq{Column: clause.Column{Table: clause.CurrentTable, Name: sd.Field.DBName}, Value: sd.ZeroValue},
    		}})
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Wed Feb 01 06:40:55 GMT 2023
    - 4.5K bytes
    - Viewed (0)
  4. callbacks/query.go

    									gussNestedRelations = append(gussNestedRelations, relation)
    									currentRelations = relation.FieldSchema.Relationships.Relations
    								} else {
    									isNestedJoin = false
    									break
    								}
    							}
    
    							if isNestedJoin {
    								isRelations = true
    								relations = gussNestedRelations
    							}
    						}
    					}
    
    					if isRelations {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Jan 29 03:34:57 GMT 2024
    - 9.9K bytes
    - Viewed (0)
  5. finisher_api.go

    			tx.AddError(result.Error)
    		}
    
    		if tx.Error != nil || int(result.RowsAffected) < batchSize {
    			break
    		}
    
    		if totalSize > 0 {
    			if totalSize <= int(rowsAffected) {
    				break
    			}
    			if totalSize/batchSize == batch {
    				batchSize = totalSize % batchSize
    			}
    		}
    
    		// Optimize for-break
    		resultsValue := reflect.Indirect(reflect.ValueOf(dest))
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Jan 12 08:42:21 GMT 2024
    - 22.7K bytes
    - Viewed (0)
  6. migrator/migrator.go

    				for _, dbName := range stmt.Schema.DBNames {
    					var foundColumn gorm.ColumnType
    
    					for _, columnType := range columnTypes {
    						if columnType.Name() == dbName {
    							foundColumn = columnType
    							break
    						}
    					}
    
    					if foundColumn == nil {
    						// not found, add column
    						if err = execTx.Migrator().AddColumn(value, dbName); err != nil {
    							return err
    						}
    					} else {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Apr 26 07:15:49 GMT 2024
    - 29K bytes
    - Viewed (0)
  7. callbacks/associations.go

    					identityMap := map[string]bool{}
    					for i := 0; i < rValLen; i++ {
    						obj := db.Statement.ReflectValue.Index(i)
    						if reflect.Indirect(obj).Kind() != reflect.Struct {
    							break
    						}
    						if _, zero := rel.Field.ValueOf(db.Statement.Context, obj); !zero { // check belongs to relation value
    							rv := rel.Field.ReflectValueOf(db.Statement.Context, obj) // relation reflect value
    							if !isPtr {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Apr 11 03:06:13 GMT 2023
    - 14.3K bytes
    - Viewed (0)
  8. callbacks/create.go

    				if config.LastInsertIDReversed {
    					for i := db.Statement.ReflectValue.Len() - 1; i >= 0; i-- {
    						rv := db.Statement.ReflectValue.Index(i)
    						if reflect.Indirect(rv).Kind() != reflect.Struct {
    							break
    						}
    
    						_, isZero := pkField.ValueOf(db.Statement.Context, rv)
    						if isZero {
    							db.AddError(pkField.Set(db.Statement.Context, rv, insertID))
    							insertID -= pkField.AutoIncrementIncrement
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 08 03:29:55 GMT 2024
    - 12.5K bytes
    - Viewed (0)
  9. callbacks/delete.go

    					if len(selects) > 0 {
    						tx = tx.Select(selects)
    					}
    				}
    
    				for _, cond := range queryConds {
    					if c, ok := cond.(clause.IN); ok && len(c.Values) == 0 {
    						withoutConditions = true
    						break
    					}
    				}
    
    				if !withoutConditions && db.AddError(tx.Clauses(clause.Where{Exprs: queryConds}).Delete(modelValue).Error) != nil {
    					return
    				}
    			case schema.Many2Many:
    				var (
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Feb 25 02:48:23 GMT 2022
    - 5.6K bytes
    - Viewed (0)
  10. tests/migrate_test.go

    	} else {
    		for _, t1 := range []string{"users", "accounts", "pets", "companies", "toys", "languages", "tools"} {
    			hasTable := false
    			for _, t2 := range tables {
    				if t2 == t1 {
    					hasTable = true
    					break
    				}
    			}
    			if !hasTable {
    				t.Fatalf("Failed to get table %v when GetTables", t1)
    			}
    		}
    	}
    
    	for _, m := range allModels {
    		if !DB.Migrator().HasTable(m) {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Mar 18 11:24:16 GMT 2024
    - 56.2K bytes
    - Viewed (0)
Back to top