- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 131 for berate (0.23 sec)
-
callbacks/create.go
if i, ok := value.(BeforeCreateInterface); ok { called = true db.AddError(i.BeforeCreate(tx)) } } return called }) } } // Create create hook func Create(config *Config) func(db *gorm.DB) { supportReturning := utils.Contains(config.CreateClauses, "RETURNING") return func(db *gorm.DB) { if db.Error != nil { return }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Apr 08 03:29:55 GMT 2024 - 12.5K bytes - Viewed (0) -
tests/create_test.go
func TestCreateFromMap(t *testing.T) { if err := DB.Model(&User{}).Create(map[string]interface{}{"Name": "create_from_map", "Age": 18}).Error; err != nil { t.Fatalf("failed to create data from map, got error: %v", err) } var result User if err := DB.Where("name = ?", "create_from_map").First(&result).Error; err != nil || result.Age != 18 { t.Fatalf("failed to create from map, got error %v", err) }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Tue Mar 19 03:50:28 GMT 2024 - 26.4K bytes - Viewed (0) -
tests/upsert_test.go
t.Errorf("user should be created with search value") } DB.FirstOrCreate(&user3, map[string]interface{}{"name": "find or create 2"}) if user3.Name != "find or create 2" || user3.ID == 0 { t.Errorf("user should be created with inline search value") } DB.Where(&User{Name: "find or create 3"}).Attrs("age", 44).FirstOrCreate(&user4)
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Sep 05 07:39:19 GMT 2022 - 11.4K bytes - Viewed (0) -
istioctl/pkg/workload/workload_test.go
description: "valid case - create full workload group", args: strings.Split("group create --name foo --namespace bar --labels app=foo,bar=baz "+ " --annotations annotation=foobar --ports grpc=3550,http=8080 --serviceAccount test", " "), expectedException: false, expectedOutput: customYAML, }, { description: "valid case - create full workload group with shortnames",
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Wed Mar 27 16:59:05 GMT 2024 - 14.6K bytes - Viewed (0) -
tests/hooks_test.go
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 { t.Fatalf("An error from after create callbacks happened when create with invalid value") }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Sat Feb 18 01:20:29 GMT 2023 - 15.9K bytes - Viewed (0) -
istioctl/pkg/multixds/gather.go
"istio.io/istio/istioctl/pkg/xds" pilotxds "istio.io/istio/pilot/pkg/xds" "istio.io/istio/pkg/kube" istioversion "istio.io/istio/pkg/version" ) const ( // Service account to create tokens in tokenServiceAccount = "default" // Get the pods with limit = 500. kubeClientGetPodLimit = 500 ) type ControlPlaneNotFoundError struct { Namespace string }
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Fri Mar 08 08:38:19 GMT 2024 - 13.6K bytes - Viewed (0) -
callbacks/associations.go
"gorm.io/gorm" "gorm.io/gorm/clause" "gorm.io/gorm/schema" "gorm.io/gorm/utils" ) func SaveBeforeAssociations(create bool) func(db *gorm.DB) { return func(db *gorm.DB) { if db.Error == nil && db.Statement.Schema != nil { selectColumns, restricted := db.Statement.SelectAndOmitColumns(create, !create) // Save Belongs To associations for _, rel := range db.Statement.Schema.Relationships.BelongsTo {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Tue Apr 11 03:06:13 GMT 2023 - 14.3K bytes - Viewed (0) -
migrator/migrator.go
}) return columnTypes, execErr } // CreateView create view from Query in gorm.ViewOption. // Query in gorm.ViewOption is a [subquery] // // // CREATE VIEW `user_view` AS SELECT * FROM `users` WHERE age > 20 // q := DB.Model(&User{}).Where("age > ?", 20) // DB.Debug().Migrator().CreateView("user_view", gorm.ViewOption{Query: q}) // // // CREATE OR REPLACE VIEW `users_view` AS SELECT * FROM `users` WITH CHECK OPTION
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Apr 26 07:15:49 GMT 2024 - 29K bytes - Viewed (0) -
cmd/erasure-decode_test.go
if err != nil { t.Fatalf("Test %d: failed to create test setup: %v", i, err) } erasure, err := NewErasure(context.Background(), test.dataBlocks, test.onDisks-test.dataBlocks, test.blocksize) if err != nil { t.Fatalf("Test %d: failed to create ErasureStorage: %v", i, err) } disks := setup.disks data := make([]byte, test.data)
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Tue Jan 30 20:43:25 GMT 2024 - 21.1K bytes - Viewed (1) -
src/cmd/asm/internal/arch/arch.go
func jumpWasm(word string) bool { return word == "JMP" || word == "CALL" || word == "Call" || word == "Br" || word == "BrIf" } func archX86(linkArch *obj.LinkArch) *Arch { register := make(map[string]int16) // Create maps for easy lookup of instruction names etc. for i, s := range x86.Register { register[s] = int16(i + x86.REG_AL) } // Pseudo-registers. register["SB"] = RSB register["FP"] = RFP register["PC"] = RPC
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Tue Mar 21 06:51:28 GMT 2023 - 21.3K bytes - Viewed (0)