Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 57 for OK (0.12 sec)

  1. callbacks/helper.go

    		for k, v := range mapValue {
    			if stmt.Schema != nil {
    				if field := stmt.Schema.LookUpField(k); field != nil {
    					k = field.DBName
    				}
    			}
    
    			if _, ok := result[k]; !ok {
    				if v, ok := selectColumns[k]; (ok && v) || (!ok && !restricted) {
    					result[k] = make([]interface{}, len(mapValues))
    					columns = append(columns, k)
    				} else {
    					continue
    				}
    			}
    
    			result[k][idx] = v
    		}
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Apr 14 12:32:57 GMT 2022
    - 3.7K bytes
    - Viewed (0)
  2. statement.go

    		fieldValue, _ := field.ValueOf(stmt.Context, modelValue)
    		if v, ok := selectColumns[field.DBName]; (ok && v) || (!ok && !restricted) {
    			if mv, mok := stmt.Dest.(map[string]interface{}); mok {
    				if fv, ok := mv[field.Name]; ok {
    					return !utils.AssertEqual(fv, fieldValue)
    				} else if fv, ok := mv[field.DBName]; ok {
    					return !utils.AssertEqual(fv, fieldValue)
    				}
    			} else {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Jan 12 08:42:21 GMT 2024
    - 19.8K bytes
    - Viewed (0)
  3. callbacks/preload.go

    	isJoined := func(name string) (joined bool, nestedJoins []string) {
    		for _, join := range joins {
    			if _, ok := relationships.Relations[join]; ok && name == join {
    				joined = true
    				continue
    			}
    			joinNames := strings.SplitN(join, ".", 2)
    			if len(joinNames) == 2 {
    				if _, ok := relationships.Relations[joinNames[0]]; ok && name == joinNames[0] {
    					joined = true
    					nestedJoins = append(nestedJoins, joinNames[1])
    				}
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Apr 25 12:21:03 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  4. schema/schema.go

    			fieldInterface := fieldValue.Interface()
    			if fc, ok := fieldInterface.(CreateClausesInterface); ok {
    				field.Schema.CreateClauses = append(field.Schema.CreateClauses, fc.CreateClauses(field)...)
    			}
    
    			if fc, ok := fieldInterface.(QueryClausesInterface); ok {
    				field.Schema.QueryClauses = append(field.Schema.QueryClauses, fc.QueryClauses(field)...)
    			}
    
    			if fc, ok := fieldInterface.(UpdateClausesInterface); ok {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Oct 10 06:50:29 GMT 2023
    - 13.7K bytes
    - Viewed (0)
  5. clause/where.go

    func (where Where) Build(builder Builder) {
    	if len(where.Exprs) == 1 {
    		if andCondition, ok := where.Exprs[0].(AndConditions); ok {
    			where.Exprs = andCondition.Exprs
    		}
    	}
    
    	// Switch position if the first query expression is a single Or condition
    	for idx, expr := range where.Exprs {
    		if v, ok := expr.(OrConditions); !ok || len(v.Exprs) > 1 {
    			if idx != 0 {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Apr 25 12:22:53 GMT 2024
    - 5.1K bytes
    - Viewed (0)
  6. schema/field.go

    	}
    
    	if v, ok := field.TagSettings["DEFAULT"]; ok {
    		field.HasDefaultValue = true
    		field.DefaultValue = v
    	}
    
    	if num, ok := field.TagSettings["SIZE"]; ok {
    		if field.Size, err = strconv.Atoi(num); err != nil {
    			field.Size = -1
    		}
    	}
    
    	if p, ok := field.TagSettings["PRECISION"]; ok {
    		field.Precision, _ = strconv.Atoi(p)
    	}
    
    	if s, ok := field.TagSettings["SCALE"]; ok {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 32K bytes
    - Viewed (1)
  7. gorm.go

    		connPool = db.Statement.ConnPool
    	}
    	if tx, ok := connPool.(*sql.Tx); ok && tx != nil {
    		return (*sql.DB)(reflect.ValueOf(tx).Elem().FieldByName("db").UnsafePointer()), nil
    	}
    
    	if dbConnector, ok := connPool.(GetDBConnector); ok && dbConnector != nil {
    		if sqldb, err := dbConnector.GetDBConn(); sqldb != nil || err != nil {
    			return sqldb, err
    		}
    	}
    
    	if sqldb, ok := connPool.(*sql.DB); ok && sqldb != nil {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sun Aug 20 11:46:56 GMT 2023
    - 11.6K bytes
    - Viewed (0)
  8. schema/relationship.go

    		Value: schema.Table,
    	}
    
    	var (
    		typeName = polymorphic + "Type"
    		typeId   = polymorphic + "ID"
    	)
    
    	if value, ok := field.TagSettings["POLYMORPHICTYPE"]; ok {
    		typeName = strings.TrimSpace(value)
    	}
    
    	if value, ok := field.TagSettings["POLYMORPHICID"]; ok {
    		typeId = strings.TrimSpace(value)
    	}
    
    	relation.Polymorphic.PolymorphicType = relation.FieldSchema.FieldsByName[typeName]
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 22.4K bytes
    - Viewed (0)
  9. schema/constraint_test.go

    		"chk_user_checks_name3": {
    			Name:       "chk_user_checks_name3",
    			Constraint: "name <> 'jinzhu'",
    		},
    	}
    
    	checks := user.ParseCheckConstraints()
    
    	for k, result := range results {
    		v, ok := checks[k]
    		if !ok {
    			t.Errorf("Failed to found check %v from parsed checks %+v", k, checks)
    		}
    
    		for _, name := range []string{"Name", "Constraint"} {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sun Feb 04 07:49:19 GMT 2024
    - 2.2K bytes
    - Viewed (0)
  10. callbacks/row.go

    package callbacks
    
    import (
    	"gorm.io/gorm"
    )
    
    func RowQuery(db *gorm.DB) {
    	if db.Error == nil {
    		BuildQuerySQL(db)
    		if db.DryRun || db.Error != nil {
    			return
    		}
    
    		if isRows, ok := db.Get("rows"); ok && isRows.(bool) {
    			db.Statement.Settings.Delete("rows")
    			db.Statement.Dest, db.Error = db.Statement.ConnPool.QueryContext(db.Statement.Context, db.Statement.SQL.String(), db.Statement.Vars...)
    		} else {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Wed Feb 08 05:40:41 GMT 2023
    - 581 bytes
    - Viewed (0)
Back to top