- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 157 for finds (0.17 sec)
-
chainable_api.go
// [docs] for more depth. // // // add a simple limit clause // db.Clauses(clause.Limit{Limit: 1}).Find(&User{}) // // tell the optimizer to use the `idx_user_name` index // db.Clauses(hints.UseIndex("idx_user_name")).Find(&User{}) // // specify the lock strength to UPDATE // db.Clauses(clause.Locking{Strength: "UPDATE"}).Find(&users) // // [docs]: https://gorm.io/docs/sql_builder.html#Clauses
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Wed Apr 17 03:38:55 GMT 2024 - 14.3K bytes - Viewed (1) -
tests/scopes_test.go
var users1, users2, users3 []User DB.Scopes(NameIn1And2).Find(&users1) if len(users1) != 2 { t.Errorf("Should found two users's name in 1, 2, but got %v", len(users1)) } DB.Scopes(NameIn1And2, NameIn2And3).Find(&users2) if len(users2) != 1 { t.Errorf("Should found one user's name is 2, but got %v", len(users2)) } DB.Scopes(NameIn([]string{users[0].Name, users[2].Name})).Find(&users3) if len(users3) != 2 {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Jan 12 08:42:21 GMT 2024 - 3.3K bytes - Viewed (0) -
istioctl/pkg/writer/ztunnel/configdump/workload.go
if !strings.EqualFold(workload.Namespace, wf.Namespace) { return false } } if wf.Address != "" { var find bool for _, ip := range workload.WorkloadIPs { if strings.EqualFold(ip, wf.Address) { find = true break } } if !find { return false } } if wf.Node != "" && !strings.EqualFold(workload.Node, wf.Node) { return false } return true }
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Tue Apr 23 21:30:30 GMT 2024 - 4K bytes - Viewed (0) -
cni/pkg/nodeagent/net.go
log.Debugf("Pod is now opt out... cleaning up.") openNetns := s.currentPodSnapshot.Take(string(pod.UID)) if openNetns == nil { log.Warn("failed to find pod netns") return fmt.Errorf("failed to find pod netns") } // pod is removed from the mesh, but is still running. remove iptables rules log.Debugf("calling DeleteInpodRules.")
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Tue Apr 30 22:24:38 GMT 2024 - 12.2K bytes - Viewed (1) -
lib/time/mkzip.go
return nil }) if err != nil { log.Fatal(err) } if err := zw.Close(); err != nil { log.Fatal(err) } if len(seen) == 0 { log.Fatalf("did not find any files to add") } if !seen["US/Eastern"] { log.Fatalf("did not find US/Eastern to add") } if err := os.WriteFile(args[0], zb.Bytes(), 0666); err != nil { log.Fatal(err) }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Mon Mar 04 17:32:07 GMT 2024 - 2.1K bytes - Viewed (0) -
tests/hooks_test.go
} if DB.Where("Code = ?", "unique_code").First(&p).Error == nil { t.Fatalf("Can't find a deleted record") } beforeCallTimes := p.AfterFindCallTimes if DB.Where("Code = ?", "unique_code").Find(&p).Error != nil { t.Fatalf("Find don't raise error when record not found") } if p.AfterFindCallTimes != beforeCallTimes { t.Fatalf("AfterFind should not be called")
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) -
tests/distinct_test.go
AssertEqual(t, names2, []string{"distinct", "distinct", "distinct", "distinct-2", "distinct-3"}) var results []User if err := DB.Distinct("name", "age").Where("name like ?", "distinct%").Order("name, age desc").Find(&results).Error; err != nil { t.Errorf("failed to query users, got error: %v", err) } expects := []User{ {Name: "distinct", Age: 20}, {Name: "distinct", Age: 18}, {Name: "distinct-2", Age: 18},
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu Jan 06 07:02:53 GMT 2022 - 2.5K bytes - Viewed (0) -
cni/pkg/nodeagent/podcgroupns_test.go
}) if err != nil { panic(err) } defer podUIDNetns.Close() if len(podUIDNetns) == 0 { t.Fatal("expected to find pod netns") } expectedUID := "863b91d4-4b68-4efa-917f-4b560e3e86aa" if podUIDNetns[expectedUID] == (WorkloadInfo{}) { t.Fatal("expected to find pod netns under pod uid") } } // copied and modified from spire func TestGetContainerIDFromCGroups(t *testing.T) {
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Fri Apr 12 21:47:31 GMT 2024 - 4.6K bytes - Viewed (0) -
istioctl/pkg/writer/compare/comparator.go
istiodDump := &configdump.Wrapper{} err := json.Unmarshal(resp, istiodDump) if err != nil { continue } c.istiod = istiodDump break } if c.istiod == nil { return nil, fmt.Errorf("unable to find config dump in Istiod responses") } envoyDump := &configdump.Wrapper{} err := json.Unmarshal(envoyResponse, envoyDump) if err != nil { return nil, err } c.envoy = envoyDump c.w = w c.context = 7
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Sun Apr 21 17:42:54 GMT 2024 - 3.7K bytes - Viewed (1) -
schema/schema_helper_test.go
)) } t.Errorf("schema %v relation %v failed to found reference %+v, has %v", s, relation.Name, ref, strings.Join(refs, ", ")) } } } else { t.Errorf("schema %v failed to find relations by name %v", s, relation.Name) } }) } type EmbeddedRelations struct { Relations map[string]Relation EmbeddedRelations map[string]EmbeddedRelations }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Dec 15 08:31:23 GMT 2023 - 7.5K bytes - Viewed (0)