- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for qsub (0.17 sec)
-
tests/migrate_test.go
func TestMigrateIndexesWithDynamicTableName(t *testing.T) { // Create primary table if err := DB.AutoMigrate(&DynamicUser{}); err != nil { t.Fatalf("AutoMigrate create table error: %#v", err) } // Create sub tables for _, v := range []string{"01", "02", "03"} { tableName := "dynamic_users_" + v m := DB.Scopes(func(db *gorm.DB) *gorm.DB { return db.Table(tableName) }).Migrator()
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) -
tests/query_test.go
*GetUser("find_in_batches_with_offset_limit", Config{}), } DB.Create(&users) var ( sub, results []User lastBatch int ) // offset limit if result := DB.Offset(3).Limit(5).Where("name = ?", users[0].Name).FindInBatches(&sub, 2, func(tx *gorm.DB, batch int) error { results = append(results, sub...) lastBatch = batch return nil }); result.Error != nil || result.RowsAffected != 5 {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu Apr 25 12:22:53 GMT 2024 - 49.8K bytes - Viewed (0)