- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 106 for agef (0.04 sec)
-
tests/scan_test.go
doubleAgeRes := &result{} if err := DB.Table("users").Select("age + age as age").Where("id = ?", user3.ID).Scan(&doubleAgeRes).Error; err != nil { t.Errorf("Scan to pointer of pointer") } if doubleAgeRes.Age != int(res.Age)*2 { t.Errorf("Scan double age as age, expect: %v, got %v", res.Age*2, doubleAgeRes.Age) } var results []result DB.Table("users").Select("name, age").Where("id in ?", []uint{user2.ID, user3.ID}).Scan(&results)
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 10:57:36 UTC 2024 - 10.9K bytes - Viewed (0) -
finisher_api.go
}, tx.Error) tx.Logger = currentLogger return } // Pluck queries a single column from a model, returning in the slice dest. E.g.: // // var ages []int64 // db.Model(&users).Pluck("age", &ages) func (db *DB) Pluck(column string, dest interface{}) (tx *DB) { tx = db.getInstance() if tx.Statement.Model != nil { if tx.Statement.Parse(tx.Statement.Model) == nil {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sat Sep 14 12:58:29 UTC 2024 - 22.8K bytes - Viewed (0) -
tests/sql_builder_test.go
} DB.Exec("update users set age=? where name = ?", gorm.Expr("age * ? + ?", 2, 10), "jinzhu-raw") var age int DB.Raw("select sum(age) from users where name = ?", "jinzhu-raw").Scan(&age) if age != ((1+10+20)*2 + 30) { t.Errorf("Invalid age, got %v", age) } } func TestRowsWithGroup(t *testing.T) { users := []User{ {Name: "having_user_1", Age: 1}, {Name: "having_user_2", Age: 10},
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Fri Jan 12 08:42:21 UTC 2024 - 16.7K bytes - Viewed (0) -
tests/query_test.go
if res.Name != "" { t.Errorf("Expected res.Name to be empty, but got %s", res.Name) } if res.Age != user.Age { t.Errorf("Expected res.Age to be %d, but got %d", user.Age, res.Age) } } func TestPluckWithSelect(t *testing.T) { users := []User{ {Name: "pluck_with_select_1", Age: 25}, {Name: "pluck_with_select_2", Age: 26}, } DB.Create(&users) var userAges []int
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 24 09:42:59 UTC 2024 - 50.4K bytes - Viewed (0) -
clause/where_test.go
}}, "SELECT * FROM `users` WHERE `age` = ? OR `name` <> ?", []interface{}{18, "jinzhu"}, }, { []clause.Interface{clause.Select{}, clause.From{}, clause.Where{
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Apr 25 12:22:53 UTC 2024 - 6.2K bytes - Viewed (0) -
logger/sql_test.go
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Mar 21 08:00:02 UTC 2024 - 8.4K bytes - Viewed (0) -
tests/test_forms_single_model.py
"username": "Rick", "lastname": "Sanchez", "age": "70", "tags": ["plumbus", "citadel"], "with": "something", }, ) assert response.status_code == 200, response.text assert response.json() == { "username": "Rick", "lastname": "Sanchez", "age": 70, "tags": ["plumbus", "citadel"], "with": "something", }
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Sep 13 09:51:00 UTC 2024 - 3.5K bytes - Viewed (0) -
tests/create_test.go
t.Fatalf("failed to create data from map, got error: %v", err) } var result1 User if err := DB.Where("name = ?", "create_from_map_1").First(&result1).Error; err != nil || result1.Age != 18 { t.Fatalf("failed to create from map, got error %v", err) } datas := []map[string]interface{}{ {"Name": "create_from_map_2", "Age": 19},
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Mar 19 03:50:28 UTC 2024 - 26.4K bytes - Viewed (0) -
tests/test_tutorial/test_sql_databases/test_tutorial001.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 09 19:44:42 UTC 2024 - 14.8K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CacheTest.kt
} @Test fun temporaryRedirectCachedWithExpiresHeader() { temporaryRedirectCachedWithCachingHeader(307, "Expires", formatDate(1, TimeUnit.HOURS)) } @Test fun temporaryRedirectCachedWithCacheControlHeader() { temporaryRedirectCachedWithCachingHeader(307, "Cache-Control", "max-age=60") } @Test
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 10 19:46:48 UTC 2024 - 108.6K bytes - Viewed (0)