- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 2,399 for save (0.03 sec)
-
cmd/signature-v4-parser.go
var s3Err APIErrorCode // Save credential values. signV4Values.Credential, s3Err = parseCredentialHeader(strings.TrimSpace(credElement), region, stype) if s3Err != ErrNone { return sv, s3Err } // Save signed headers. signV4Values.SignedHeaders, s3Err = parseSignedHeader(authFields[1]) if s3Err != ErrNone { return sv, s3Err } // Save signature.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Jan 18 07:03:17 UTC 2024 - 9.4K bytes - Viewed (0) -
tests/update_belongs_to_test.go
user.Manager = &User{Name: "manager-belongs-to-association"} if err := DB.Save(&user).Error; err != nil { t.Fatalf("errors happened when update: %v", err) } var user2 User DB.Preload("Company").Preload("Manager").Find(&user2, "id = ?", user.ID) CheckUser(t, user2, user) user.Company.Name += "new" user.Manager.Name += "new" if err := DB.Save(&user).Error; err != nil { t.Fatalf("errors happened when update: %v", err) }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Jul 14 06:55:54 UTC 2022 - 1.6K bytes - Viewed (0) -
tests/update_has_many_test.go
} user.Pets = []*Pet{{Name: "pet1"}, {Name: "pet2"}} if err := DB.Save(&user).Error; err != nil { t.Fatalf("errors happened when update: %v", err) } var user2 User DB.Preload("Pets").Find(&user2, "id = ?", user.ID) CheckUser(t, user2, user) for _, pet := range user.Pets { pet.Name += "new" } if err := DB.Save(&user).Error; err != nil { t.Fatalf("errors happened when update: %v", err) }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Jan 06 07:02:53 UTC 2022 - 2K bytes - Viewed (0) -
tests/non_std_test.go
if err := DB.AutoMigrate(&Animal{}); err != nil { t.Fatalf("no error should happen when migrate but got %v", err) } animal := Animal{Name: "Ferdinand"} 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
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed May 08 04:07:58 UTC 2024 - 1.9K bytes - Viewed (0) -
tests/update_test.go
func TestSaveWithPrimaryValue(t *testing.T) { lang := Language{Code: "save", Name: "save"} if result := DB.Save(&lang); result.RowsAffected != 1 { t.Errorf("should create language, rows affected: %v", result.RowsAffected) } var result Language DB.First(&result, "code = ?", "save") AssertEqual(t, result, lang) lang.Name = "save name2" if result := DB.Save(&lang); result.RowsAffected != 1 {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Dec 04 03:50:58 UTC 2023 - 30.3K bytes - Viewed (0) -
tests/update_has_one_test.go
} user.Account = Account{Number: "account-has-one-association"} if err := DB.Save(&user).Error; err != nil { t.Fatalf("errors happened when update: %v", err) } var user2 User DB.Preload("Account").Find(&user2, "id = ?", user.ID) CheckUser(t, user2, user) user.Account.Number += "new" if err := DB.Save(&user).Error; err != nil { t.Fatalf("errors happened when update: %v", err) } var user3 User
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Jul 14 06:55:54 UTC 2022 - 3.6K bytes - Viewed (0) -
tests/hooks_test.go
DB.AutoMigrate(&Product{}) p := Product{Code: "Invalid", Price: 100} if DB.Save(&p).Error == nil { t.Fatalf("An error from before create callbacks happened when create with invalid value") } if DB.Where("code = ?", "Invalid").First(&Product{}).Error == nil { t.Fatalf("Should not save record that have errors") } if DB.Save(&Product{Code: "dont_save", Price: 100}).Error == nil {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 17 03:59:06 UTC 2024 - 16.7K bytes - Viewed (0) -
tests/upsert_test.go
} } } func TestUpsertWithSave(t *testing.T) { langs := []Language{ {Code: "upsert-save-1", Name: "Upsert-save-1"}, {Code: "upsert-save-2", Name: "Upsert-save-2"}, } if err := DB.Save(&langs).Error; err != nil { t.Errorf("Failed to create, got error %v", err) } for _, lang := range langs { var result Language
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Sep 05 07:39:19 UTC 2022 - 11.4K bytes - Viewed (0) -
tests/scan_test.go
} } func TestScanToEmbedded(t *testing.T) { person1 := Person{Name: "person 1"} person2 := Person{Name: "person 2"} DB.Save(&person1).Save(&person2) address1 := Address{Name: "address 1"} address2 := Address{Name: "address 2"} DB.Save(&address1).Save(&address2) DB.Create(&PersonAddress{PersonID: person1.ID, AddressID: int(address1.ID)})
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 10:57:36 UTC 2024 - 10.9K bytes - Viewed (0) -
tests/transaction_test.go
tx := DB.Begin() user := *GetUser("transaction-save-point", Config{}) tx.Create(&user) if err := tx.First(&User{}, "name = ?", user.Name).Error; err != nil { t.Fatalf("Should find saved record") } if err := tx.SavePoint("save_point1").Error; err != nil { t.Fatalf("Failed to save point, got error %v", err) } user1 := *GetUser("transaction-save-point-1", Config{}) tx.Create(&user1)
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sat Sep 14 12:58:29 UTC 2024 - 12.9K bytes - Viewed (0)