Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for break (0.17 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. schema/index.go

    	for _, field := range schema.Fields {
    		if field.TagSettings["INDEX"] != "" || field.TagSettings["UNIQUEINDEX"] != "" {
    			fieldIndexes, err := parseFieldIndexes(field)
    			if err != nil {
    				schema.err = err
    				break
    			}
    			for _, index := range fieldIndexes {
    				idx := indexes[index.Name]
    				idx.Name = index.Name
    				if idx.Class == "" {
    					idx.Class = index.Class
    				}
    				if idx.Type == "" {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sun Feb 04 07:49:19 GMT 2024
    - 3.7K bytes
    - Viewed (0)
  3. schema/utils.go

    		j := i
    		if len(names[j]) > 0 {
    			for {
    				if names[j][len(names[j])-1] == '\\' {
    					i++
    					names[j] = names[j][0:len(names[j])-1] + sep + names[i]
    					names[i] = ""
    				} else {
    					break
    				}
    			}
    		}
    
    		values := strings.Split(names[j], ":")
    		k := strings.TrimSpace(strings.ToUpper(values[0]))
    
    		if len(values) >= 2 {
    			settings[k] = strings.Join(values[1:], ":")
    		} else if k != "" {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sat Aug 19 13:35:14 GMT 2023
    - 5.5K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  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. 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)
  10. 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)
Back to top