- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for Equals (0.04 sec)
-
tests/soft_delete_test.go
} if err := DB.Delete(&book).Error; err != nil { t.Fatalf("No error should happen when soft delete user, but got %v", err) } zeroTime, _ := now.Parse("1970-01-01 00:00:01") if book.DeletedAt.Time.Equal(zeroTime) { t.Errorf("book's deleted at should not be zero, DeletedAt: %v", book.DeletedAt) } if DB.First(&SoftDeleteBook{}, "name = ?", book.Name).Error == nil { t.Errorf("Can't find a soft deleted record")
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Feb 01 06:40:55 UTC 2023 - 5.7K bytes - Viewed (0) -
tests/associations_belongs_to_test.go
} if users[0].CompanyID == nil || users[1].CompanyID == nil || *users[0].CompanyID != *users[1].CompanyID { t.Errorf("user's company id should exists and equal, but its: %v, %v", users[0].CompanyID, users[1].CompanyID) } DB.Model(&users[0]).Association("Company").Delete(&company) AssertAssociationCount(t, users[0], "Company", 0, "After Delete")
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Oct 30 09:15:49 UTC 2023 - 9.3K bytes - Viewed (0) -
utils/utils_test.go
out bool }{ {"error equal", errors.New("1"), errors.New("1"), true}, {"error not equal", errors.New("1"), errors.New("2"), false}, {"driver.Valuer equal", ModifyAt{Time: now, Valid: true}, ModifyAt{Time: now, Valid: true}, true}, {"driver.Valuer not equal", ModifyAt{Time: now, Valid: true}, ModifyAt{Time: now.Add(time.Second), Valid: true}, false}, {"driver.Valuer equal (ptr to nil ptr)", (*ModifyAt)(nil), &ModifyAt{}, false},
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Aug 22 11:03:42 UTC 2024 - 4.9K bytes - Viewed (0) -
tests/helper_test.go
if pet == nil || expect.Pets[idx] == nil { t.Errorf("pets#%v should equal, expect: %v, got %v", idx, expect.Pets[idx], pet) } else { doCheckPet(t, *pet, *expect.Pets[idx], unscoped) } } }) t.Run("Toys", func(t *testing.T) { if len(user.Toys) != len(expect.Toys) { t.Fatalf("toys should equal, expect: %v, got %v", len(expect.Toys), len(user.Toys)) }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Mar 19 03:50:28 UTC 2024 - 8K bytes - Viewed (0) -
schema/constraint_test.go
} for _, name := range []string{"Name", "Constraint"} { if reflect.ValueOf(result).FieldByName(name).Interface() != reflect.ValueOf(v).FieldByName(name).Interface() { t.Errorf( "check %v %v should equal, expects %v, got %v", k, name, reflect.ValueOf(result).FieldByName(name).Interface(), reflect.ValueOf(v).FieldByName(name).Interface(), ) } } } } func TestParseUniqueConstraints(t *testing.T) {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sun Feb 04 07:49:19 UTC 2024 - 2.2K bytes - Viewed (0) -
tests/gorm_test.go
} else if results.RowsAffected != 2 { t.Fatalf("rows affected expects: %v, got %v", 1, results.RowsAffected) } else if u1.ID == 0 { t.Fatalf("ID expects : not equal 0, got %v", u1.ID) } else if u2.ID == 0 { t.Fatalf("ID expects : not equal 0, got %v", u2.ID) } var gotUsers []user results = DB.Where("id in (?, ?)", u1.ID, u2.ID).Order("id asc").Select("id, name").Find(&gotUsers) if results.Error != nil {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Jun 01 07:22:21 UTC 2023 - 3.3K bytes - Viewed (0) -
clause/expression.go
break } fallthrough default: builder.WriteString(" NOT IN (") builder.AddVar(builder, in.Values...) builder.WriteByte(')') } } // Eq equal to for where type Eq struct { Column interface{} Value interface{} } func (eq Eq) Build(builder Builder) { builder.WriteQuoted(eq.Column) switch eq.Value.(type) {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Oct 10 06:45:48 UTC 2023 - 8.3K bytes - Viewed (0) -
clause/expression_test.go
if stmt.SQL.String() != result.Result { t.Errorf("generated SQL is not equal, expects %v, but got %v", result.Result, stmt.SQL.String()) } if !reflect.DeepEqual(result.ExpectedVars, stmt.Vars) { t.Errorf("generated vars is not equal, expects %v, but got %v", result.ExpectedVars, stmt.Vars) } }) } } func TestExpression(t *testing.T) {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Aug 10 05:34:33 UTC 2023 - 8.4K bytes - Viewed (0) -
schema/naming_test.go
} ns := NamingStrategy{} for key, value := range maps { if ns.toDBName(key) != value { t.Errorf("%v toName should equal %v, but got %v", key, value, ns.toDBName(key)) } } maps = map[string]string{ "x": "X", "user_restrictions": "UserRestriction",
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Tue May 30 02:00:48 UTC 2023 - 7K bytes - Viewed (0)