- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for manid (2.68 sec)
-
tests/scopes_test.go
if result.RowsAffected != 2 { t.Errorf("Should found two users's name in 1, 2, but got %v", result.RowsAffected) } var maxId int64 userTable := func(db *gorm.DB) *gorm.DB { return db.WithContext(context.Background()).Table("users") } if err := DB.Scopes(userTable).Select("max(id)").Scan(&maxId).Error; err != nil { t.Errorf("select max(id)") } } func TestComplexScopes(t *testing.T) { tests := []struct {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Jan 12 08:42:21 GMT 2024 - 3.3K bytes - Viewed (0)