- Sort Score
- Num 10 results
- Language All
Results 1 - 1 of 1 for WithResult (0.04 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
tests/generics_test.go
ctx := context.Background() users := []User{{Name: "TestGenericsWithResult", Age: 18}, {Name: "TestGenericsWithResult2", Age: 18}} result := gorm.WithResult() err := gorm.G[User](DB, result).CreateInBatches(ctx, &users, 2) if err != nil { t.Errorf("failed to create users WithResult") } if result.RowsAffected != 2 { t.Errorf("failed to get affected rows, got %d, should be %d", result.RowsAffected, 2) } }
Created: Sun Dec 28 09:35:17 GMT 2025 - Last Modified: Sun Nov 02 14:09:18 GMT 2025 - 33.7K bytes - Click Count (0)