- Sort Score
- Result 10 results
- Languages All
Results 41 - 43 of 43 for UInt64 (0.15 sec)
-
tests/associations_test.go
package tests_test import ( "testing" "gorm.io/gorm" "gorm.io/gorm/clause" "gorm.io/gorm/schema" . "gorm.io/gorm/utils/tests" ) func AssertAssociationCount(t *testing.T, data interface{}, name string, result int64, reason string) { if count := DB.Model(data).Association(name).Count(); count != result { t.Fatalf("invalid %v count %v, expects: %v got %v", name, reason, result, count) } var newUser User
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Wed Feb 08 08:29:09 GMT 2023 - 10.9K bytes - Viewed (0) -
association.go
} } } return association.Error } func (association *Association) Clear() error { return association.Replace() } func (association *Association) Count() (count int64) { if association.Error == nil { association.Error = association.buildCondition().Count(&count).Error } return } type assignBack struct { Source reflect.Value Index int
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu May 04 11:30:45 GMT 2023 - 21.2K bytes - Viewed (0) -
tests/associations_many2many_test.go
}(user, languages[i]) } wg.Wait() var find User err = db.Preload(clause.Associations).Where("id = ?", user.ID).First(&find).Error AssertEqual(t, err, nil) AssertAssociationCount(t, find, "Languages", int64(count), "after concurrent append") } func TestMany2ManyDuplicateBelongsToAssociation(t *testing.T) { user1 := User{Name: "TestMany2ManyDuplicateBelongsToAssociation-1", Friends: []*User{
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Sat Jun 10 13:05:19 GMT 2023 - 13.2K bytes - Viewed (0)