- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 22 for pool (0.14 sec)
-
scan.go
} if !isNilPtrValue { // ignore if value is nil f := joinFields[idx][len(joinFields[idx])-1] db.AddError(f.Set(db.Statement.Context, relValue, values[idx])) } } // release data to pool field.NewValuePool.Put(values[idx]) } } // ScanMode scan data mode type ScanMode uint8 // scan modes const ( ScanInitialized ScanMode = 1 << 0 // 1
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) -
tests/joins_test.go
} else if len(users2) != len(users) { t.Fatalf("Failed to load join users, got: %v, expect: %v", len(users2), len(users)) } sort.Slice(users2, func(i, j int) bool { return users2[i].ID > users2[j].ID }) sort.Slice(users, func(i, j int) bool { return users[i].ID > users[j].ID }) for idx, user := range users { CheckUser(t, user, users2[idx]) } } func TestJoinConds(t *testing.T) {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Wed Apr 26 14:19:32 GMT 2023 - 13.5K bytes - Viewed (1) -
finisher_api.go
} Scan(rows, tx, ScanInitialized) return tx.Error } // Connection uses a db connection to execute an arbitrary number of commands in fc. When finished, the connection is // returned to the connection pool. func (db *DB) Connection(fc func(tx *DB) error) (err error) { if db.Error != nil { return db.Error } tx := db.getInstance() sqlDB, err := tx.DB() if err != nil { return }
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) -
callbacks/associations.go
} } else { onConflict.DoNothing = true } return } func saveAssociations(db *gorm.DB, rel *schema.Relationship, rValues reflect.Value, selectColumns map[string]bool, restricted bool, defaultUpdatingColumns []string) error { // stop save association loop if checkAssociationsSaved(db, rValues) { return nil } var ( selects, omits []string
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) -
migrator/migrator.go
func (m Migrator) ReorderModels(values []interface{}, autoAdd bool) (results []interface{}) { type Dependency struct { *gorm.Statement Depends []*schema.Schema } var ( modelNames, orderedModelNames []string orderedModelNamesMap = map[string]bool{} parsedSchemas = map[*schema.Schema]bool{} valuesMap = map[string]Dependency{}
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Apr 26 07:15:49 GMT 2024 - 29K bytes - Viewed (0) -
callbacks/query.go
} } specifiedRelationsName := make(map[string]interface{}) for _, join := range db.Statement.Joins { if db.Statement.Schema != nil { var isRelations bool // is relations or raw sql var relations []*schema.Relationship relation, ok := db.Statement.Schema.Relationships.Relations[join.Name] if ok { isRelations = true
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) -
callbacks/create.go
if db.Error == nil && db.Statement.Schema != nil && !db.Statement.SkipHooks && (db.Statement.Schema.BeforeSave || db.Statement.Schema.BeforeCreate) { callMethod(db, func(value interface{}, tx *gorm.DB) (called bool) { if db.Statement.Schema.BeforeSave { if i, ok := value.(BeforeSaveInterface); ok { called = true db.AddError(i.BeforeSave(tx)) } } if db.Statement.Schema.BeforeCreate {
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) -
tests/preload_suits_test.go
err := DB.Preload("Level2.Level3.Level4s").Find(&got).Error if err != nil { t.Error(err) } for _, level1 := range append(got, want...) { sort.Slice(level1.Level2.Level3.Level4s, func(i, j int) bool { return level1.Level2.Level3.Level4s[i].ID > level1.Level2.Level3.Level4s[j].ID }) } if !reflect.DeepEqual(got, want) { t.Errorf("got %s; want %s", toJSONString(got), toJSONString(want)) }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Mar 18 05:38:46 GMT 2022 - 30.3K bytes - Viewed (0) -
tests/update_test.go
sort.Slice(result.Pets, func(i, j int) bool { return result.Pets[i].ID < result.Pets[j].ID }) sort.Slice(result.Team, func(i, j int) bool { return result.Team[i].ID < result.Team[j].ID }) sort.Slice(result.Friends, func(i, j int) bool { return result.Friends[i].ID < result.Friends[j].ID }) sort.Slice(result2.Pets, func(i, j int) bool { return result2.Pets[i].ID < result2.Pets[j].ID })
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Dec 04 03:50:58 GMT 2023 - 30.3K bytes - Viewed (0) -
tests/scanner_valuer_test.go
} data := ScannerValuerStruct{ Name: sql.NullString{String: "name", Valid: true}, Gender: &sql.NullString{String: "M", Valid: true}, Age: sql.NullInt64{Int64: 18, Valid: true}, Male: sql.NullBool{Bool: true, Valid: true}, Height: sql.NullFloat64{Float64: 1.8888, Valid: true}, Birthday: sql.NullTime{Time: time.Now(), Valid: true}, Allergen: NullString{sql.NullString{String: "Allergen", Valid: true}},
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Wed Jun 07 07:02:07 GMT 2023 - 10.6K bytes - Viewed (0)