- Sort Score
- Num 10 results
- Language All
Results 1 - 2 of 2 for tx (0.02 seconds)
-
tests/query_test.go
results []User totalBatch int ) if result := DB.Table("users as u").Where("name = ?", users[0].Name).FindInBatches(&results, 2, func(tx *gorm.DB, batch int) error { totalBatch += batch if tx.RowsAffected != 2 { t.Errorf("Incorrect affected rows, expects: 2, got %v", tx.RowsAffected) } if len(results) != 2 { t.Errorf("Incorrect users length, expects: 2, got %v", len(results)) }
Created: Sun Apr 05 09:35:12 GMT 2026 - Last Modified: Tue Jul 22 06:21:04 GMT 2025 - 51K bytes - Click Count (0) -
tests/migrate_test.go
} var err error _ = DB.Migrator().DropTable(&RelationModel1{}, &RelationModel2{}, &RelationModel3{}) tx := DB.Session(&gorm.Session{}) tx.IgnoreRelationshipsWhenMigrating = true err = tx.AutoMigrate(&RelationModel3{}) if err != nil { t.Errorf("AutoMigrate err:%v", err) } // RelationModel3 should be existed
Created: Sun Apr 05 09:35:12 GMT 2026 - Last Modified: Sat Mar 21 11:49:01 GMT 2026 - 66.3K bytes - Click Count (0)