- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for tidbSkip (0.07 sec)
-
tests/associations_test.go
} if err := DB.Model(member).Association("Profiles").Clear(); err == nil { t.Fatalf("No error occurred during clearind not null association") } } func TestForeignKeyConstraints(t *testing.T) { tidbSkip(t, "not support the foreign key feature") type Profile struct { ID uint Name string MemberID uint } type Member struct { ID uint Refer uint `gorm:"uniqueIndex"`
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Feb 08 08:29:09 UTC 2023 - 10.9K bytes - Viewed (0) -
tests/error_translator_test.go
if !errors.Is(err, gorm.ErrDuplicatedKey) { t.Fatalf("expected err: %v got err: %v", gorm.ErrDuplicatedKey, err) } } func TestSupportedDialectorWithErrForeignKeyViolated(t *testing.T) { tidbSkip(t, "not support the foreign key feature") type City struct { gorm.Model Name string `gorm:"unique"` } type Museum struct { gorm.Model Name string `gorm:"unique"` CityID uint
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jul 12 13:21:22 UTC 2023 - 3.1K bytes - Viewed (0) -
tests/helper_test.go
AssertObjEqual(t, friend, expect.Friends[idx], "ID", "CreatedAt", "UpdatedAt", "DeletedAt", "Name", "Age", "Birthday", "CompanyID", "ManagerID", "Active") } }) } func tidbSkip(t *testing.T, reason string) { if isTiDB() { t.Skipf("This test case skipped, because of TiDB '%s'", reason) } } func isTiDB() bool { return os.Getenv("GORM_DIALECT") == "tidb" }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Mar 19 03:50:28 UTC 2024 - 8K bytes - Viewed (0) -
tests/associations_belongs_to_test.go
// unexist company id unexistCompanyID := company.ID + 9999999 user = User{Name: "invalid-user-with-invalid-belongs-to-foreign-key", CompanyID: &unexistCompanyID} if err := DB.Create(&user).Error; err == nil { tidbSkip(t, "not support the foreign key feature") t.Errorf("should have gotten foreign key violation error") } } func TestBelongsToAssociationForSlice(t *testing.T) { users := []User{
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Oct 30 09:15:49 UTC 2023 - 9.3K bytes - Viewed (0) -
tests/associations_many2many_test.go
t.Errorf("Error happened when clear Languages, got %v", err) } AssertAssociationCount(t, user2, "Languages", 0, "after clear") } func TestMany2ManyOmitAssociations(t *testing.T) { tidbSkip(t, "not support the foreign key feature") user := *GetUser("many2many_omit_associations", Config{Languages: 2}) if err := DB.Omit("Languages.*").Create(&user).Error; err == nil {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sat Jun 10 13:05:19 UTC 2023 - 13.2K bytes - Viewed (0) -
tests/migrate_test.go
} if DB.Table("column_structs").Migrator().HasColumn(&NewColumnStruct{}, "new_new_name") { t.Fatalf("Found deleted column") } } func TestMigrateColumns(t *testing.T) { tidbSkip(t, "use another test case") sqlite := DB.Dialector.Name() == "sqlite" sqlserver := DB.Dialector.Name() == "sqlserver" type ColumnStruct struct { gorm.Model Name string
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Mar 18 11:24:16 UTC 2024 - 56.2K bytes - Viewed (0)