- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 55 for Updated (0.15 sec)
-
tests/update_many2many_test.go
if err := DB.Save(&user).Error; err != nil { t.Fatalf("errors happened when update: %v", err) } var user3 User DB.Preload("Languages").Preload("Friends").Find(&user3, "id = ?", user.ID) CheckUser(t, user2, user3) if err := DB.Session(&gorm.Session{FullSaveAssociations: true}).Save(&user).Error; err != nil { t.Fatalf("errors happened when update: %v", err) } var user4 User
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu Jan 06 07:02:53 GMT 2022 - 1.3K bytes - Viewed (0) -
tests/scanner_valuer_test.go
} if err := DB.Model(&data).Update("password", EncryptedData("xnewpass")).Error; err == nil { t.Errorf("Should failed to update data with invalid data") } if err := DB.Model(&data).Update("password", EncryptedData("newpass")).Error; err != nil { t.Errorf("Should got no error update data with valid data, but got %v", err) }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Wed Jun 07 07:02:07 GMT 2023 - 10.6K bytes - Viewed (0) -
tests/associations_belongs_to_test.go
t.Fatalf("failed to create items, got error: %v", err) } // test replace if err := tx.Model(&item).Association("ItemParent").Unscoped().Replace(&ItemParent{ Logo: "updated logo", }); err != nil { t.Errorf("failed to replace item parent, got error: %v", err) } var parents []ItemParent if err := tx.Find(&parents).Error; err != nil {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Oct 30 09:15:49 GMT 2023 - 9.3K bytes - Viewed (0) -
schema/schema_test.go
{Name: "CreatedAt", DBName: "created_at", BindNames: []string{"Model", "CreatedAt"}, DataType: schema.Time}, {Name: "UpdatedAt", DBName: "updated_at", BindNames: []string{"Model", "UpdatedAt"}, DataType: schema.Time}, {Name: "DeletedAt", DBName: "deleted_at", BindNames: []string{"Model", "DeletedAt"}, Tag: `gorm:"index"`, DataType: schema.Time},
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Dec 15 08:31:23 GMT 2023 - 12.9K bytes - Viewed (0) -
tests/sql_builder_test.go
}) assertEqualSQL(t, `UPDATE "users" SET "created_at"='2021-10-18 00:00:00',"updated_at"='2021-10-18 19:50:09.438',"name"='bar',"age"=22 WHERE id = 100 AND "users"."deleted_at" IS NULL`, sql) // update sql = DB.ToSQL(func(tx *gorm.DB) *gorm.DB { return tx.Model(&User{}).Where("id = ?", 100).Update("name", "Foo bar") })
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Jan 12 08:42:21 GMT 2024 - 16.7K bytes - Viewed (0) -
callbacks/update.go
if i, ok := value.(BeforeUpdateInterface); ok { called = true db.AddError(i.BeforeUpdate(tx)) } } return called }) } } // Update update hook func Update(config *Config) func(db *gorm.DB) { supportReturning := utils.Contains(config.UpdateClauses, "RETURNING") return func(db *gorm.DB) { if db.Error != nil { return }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Mar 18 05:44:55 GMT 2024 - 9.4K bytes - Viewed (1) -
tests/non_std_test.go
DB.Save(&animal) updatedAt1 := animal.UpdatedAt DB.Save(&animal).Update("name", "Francis") if updatedAt1.Format(time.RFC3339Nano) == animal.UpdatedAt.Format(time.RFC3339Nano) { t.Errorf("UpdatedAt should be updated") } var animals []Animal DB.Find(&animals) if count := DB.Model(Animal{}).Where("1=1").Update("CreatedAt", time.Now().Add(2*time.Hour)).RowsAffected; count != int64(len(animals)) {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu Jan 06 07:02:53 GMT 2022 - 1.9K bytes - Viewed (0) -
.github/workflows/missing_playground.yml
stale-issue-label: "status:stale" days-before-stale: 0 days-before-close: 30 remove-stale-when-updated: true
Others - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Tue Apr 11 02:27:05 GMT 2023 - 1.3K bytes - Viewed (0) -
callbacks/callbacks.go
updateCallback := db.Callback().Update() updateCallback.Match(enableTransaction).Register("gorm:begin_transaction", BeginTransaction) updateCallback.Register("gorm:setup_reflect_value", SetupUpdateReflectValue) updateCallback.Register("gorm:before_update", BeforeUpdate) updateCallback.Register("gorm:save_before_associations", SaveBeforeAssociations(false)) updateCallback.Register("gorm:update", Update(config))
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Wed Oct 27 23:56:55 GMT 2021 - 3.3K bytes - Viewed (0) -
tests/named_polymorphic_test.go
DB.Model(&hamster).Association("PreferredToy").Find(&hamsterToy) if hamsterToy.Name != "bike 2" { t.Errorf("Should update has one polymorphic association with Append") } hamsterToy = Toy{} DB.Model(&hamster).Association("OtherToy").Find(&hamsterToy) if hamsterToy.Name != "treadmill 2" { t.Errorf("Should update has one polymorphic association with Append") } if DB.Model(&hamster2).Association("PreferredToy").Count() != 1 {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Wed Jul 08 09:59:40 GMT 2020 - 4.2K bytes - Viewed (0)