- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 551 for Find$ (0.02 sec)
-
tests/upsert_test.go
} DB.Where(&User{Name: "find or init"}).Assign("age", 44).FirstOrInit(&user4) if user4.Name != "find or init" || user4.ID != 0 || user4.Age != 44 { t.Errorf("user should be initialized with search value and assign attrs") } DB.Save(&User{Name: "find or init", Age: 33}) DB.Where(&User{Name: "find or init"}).Attrs("age", 44).FirstOrInit(&user5) if user5.Name != "find or init" || user5.ID == 0 || user5.Age != 33 {
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/transaction_test.go
if err := DB.First(&User{}, "name = ?", user.Name).Error; err != nil { t.Fatalf("Should find saved record") } if err := DB.First(&User{}, "name = ?", user1.Name).Error; err == nil { t.Fatalf("Should not find rollbacked record") } if err := DB.First(&User{}, "name = ?", user2.Name).Error; err != nil { t.Fatalf("Should find saved record") } } func TestNestedTransactionWithBlock(t *testing.T) { var (
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sat Sep 14 12:58:29 UTC 2024 - 12.9K bytes - Viewed (0) -
tests/multi_primary_keys_test.go
var tags []Tag DB.Model(&blog).Association("SharedTags").Find(&tags) if !compareTags(tags, []string{"tag1", "tag2", "tag3"}) { t.Fatalf("Should find 3 tags") } DB.Model(&blog2).Association("SharedTags").Find(&tags) if !compareTags(tags, []string{"tag1", "tag2", "tag3"}) { t.Fatalf("Should find 3 tags") } var blog1 Blog DB.Preload("SharedTags").Find(&blog1)
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Jan 06 07:02:53 UTC 2022 - 12.8K bytes - Viewed (0) -
tests/query_test.go
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 24 09:42:59 UTC 2024 - 50.4K bytes - Viewed (0) -
tests/table_test.go
func TestTable(t *testing.T) { dryDB := DB.Session(&gorm.Session{DryRun: true}) r := dryDB.Table("`user`").Find(&User{}).Statement if !regexp.MustCompile("SELECT \\* FROM `user`").MatchString(r.Statement.SQL.String()) { t.Errorf("Table with escape character, got %v", r.Statement.SQL.String()) } r = dryDB.Table("user as u").Select("name").Find(&User{}).Statement
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sat Mar 09 09:31:28 UTC 2024 - 10.6K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/testers/AbstractListIndexOfTester.java
protected abstract int find(@Nullable Object o); /** Override to return "indexOf" or "lastIndexOf()" for use in failure messages. */ protected abstract String getMethodName(); @CollectionSize.Require(absent = ZERO) public void testFind_yes() { assertEquals( getMethodName() + "(firstElement) should return 0", 0, find(getOrderedElements().get(0))); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Jul 24 20:12:35 UTC 2024 - 3.3K bytes - Viewed (0) -
tests/preload_test.go
t.Fatalf("errors happened when create: %v", err) } var user2 User DB.Preload("Pets.Toy").Find(&user2, "id = ?", user.ID) CheckUser(t, user2, user) var user3 User DB.Preload(clause.Associations+"."+clause.Associations).Find(&user3, "id = ?", user.ID) CheckUser(t, user3, user) var user4 *User DB.Preload("Pets.Toy").Find(&user4, "id = ?", user.ID) CheckUser(t, *user4, user) }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 10:00:47 UTC 2024 - 15.9K bytes - Viewed (0) -
src/main/webapp/js/admin/plugins/daterangepicker/daterangepicker.js
this.container.find('.applyBtn, .cancelBtn').addClass(this.buttonClasses); if (this.applyButtonClasses.length) this.container.find('.applyBtn').addClass(this.applyButtonClasses); if (this.cancelButtonClasses.length) this.container.find('.cancelBtn').addClass(this.cancelButtonClasses); this.container.find('.applyBtn').html(this.locale.applyLabel);
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Sat Oct 26 01:49:09 UTC 2024 - 64.8K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/testers/AbstractListIndexOfTester.java
protected abstract int find(@Nullable Object o); /** Override to return "indexOf" or "lastIndexOf()" for use in failure messages. */ protected abstract String getMethodName(); @CollectionSize.Require(absent = ZERO) public void testFind_yes() { assertEquals( getMethodName() + "(firstElement) should return 0", 0, find(getOrderedElements().get(0))); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Jul 24 20:12:35 UTC 2024 - 3.3K bytes - Viewed (0) -
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
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 24 09:42:59 UTC 2024 - 14.8K bytes - Viewed (0)