- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 138 for Age (0.24 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)
Go - Registered: Sun Apr 21 09:35:09 GMT 2024 - Last Modified: Sat May 28 14:18:07 GMT 2022 - 8.2K 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{
Go - Registered: Sun Apr 21 09:35:09 GMT 2024 - Last Modified: Tue Mar 05 02:23:51 GMT 2024 - 5.6K bytes - Viewed (0) -
tests/group_by_test.go
Go - Registered: Sun Apr 21 09:35:09 GMT 2024 - Last Modified: Thu Jan 06 07:02:53 GMT 2022 - 3.3K bytes - Viewed (0) -
tests/update_test.go
if err := DB.Model(&results[1]).Clauses(clause.Returning{Columns: []clause.Column{{Name: "age"}}}).Updates(map[string]interface{}{"age": gorm.Expr("age + ?", 100)}).Error; err != nil { t.Errorf("Not error should happen when updating with gorm expr, but got %v", err) } if results[1].Age-results[0].Age != 100 { t.Errorf("failed to return updated age column") } } func TestUpdateWithDiffSchema(t *testing.T) {
Go - Registered: Sun Apr 21 09:35:09 GMT 2024 - Last Modified: Mon Dec 04 03:50:58 GMT 2023 - 30.3K bytes - Viewed (0) -
logger/sql_test.go
Go - Registered: Sun Apr 21 09:35:09 GMT 2024 - Last Modified: Thu Mar 21 08:00:02 GMT 2024 - 8.4K bytes - Viewed (0) -
docs_src/python_types/tutorial003.py
def get_name_with_age(name: str, age: int): name_with_age = name + " is this old: " + age
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 119 bytes - Viewed (0) -
tensorflow/c/experimental/filesystem/plugins/gcs/expiring_lru_cache.h
/// max item age (in seconds) and max entries. /// /// This class is thread safe. template <typename T> class ExpiringLRUCache { public: /// A `max_age` of 0 means that nothing is cached. A `max_entries` of 0 means /// that there is no limit on the number of entries in the cache (however, if /// `max_age` is also 0, the cache will not be populated).
C - Registered: Tue Apr 23 12:39:09 GMT 2024 - Last Modified: Thu Jul 09 19:31:22 GMT 2020 - 6.3K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CookieTest.kt
.isEqualTo(2000L) assertThat(parseCookie(0L, url, "a=b; Expires=Thu, 01 Jan 1970 00:00:01 GMT; Max-Age=2")!!.expiresAt) .isEqualTo(2000L) } /** If a cookie incorrectly defines multiple 'Max-Age' attributes, the last one defined wins. */ @Test fun lastMaxAgeWins() { assertThat(parseCookie(0L, url, "a=b; Max-Age=2; Max-Age=4; Max-Age=1; Max-Age=3")!!.expiresAt)
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 24.3K bytes - Viewed (0) -
tests/soft_delete_test.go
DB.Save(&user) var count int64 var age uint if DB.Model(&User{}).Where("name = ?", user.Name).Count(&count).Error != nil || count != 1 { t.Errorf("Count soft deleted record, expects: %v, got: %v", 1, count) } if DB.Model(&User{}).Select("age").Where("name = ?", user.Name).Scan(&age).Error != nil || age != user.Age { t.Errorf("Age soft deleted record, expects: %v, got: %v", 0, age) }
Go - Registered: Sun Apr 21 09:35:09 GMT 2024 - Last Modified: Wed Feb 01 06:40:55 GMT 2023 - 5.7K 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},
Go - Registered: Sun Apr 21 09:35:09 GMT 2024 - Last Modified: Fri Jan 12 08:42:21 GMT 2024 - 16.7K bytes - Viewed (0)