- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 47 for age (0.02 sec)
-
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/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)
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/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) -
chainable_api.go
// Select accepts both string arguments and arrays. // // // Select name and age of user using multiple arguments // db.Select("name", "age").Find(&users) // // Select name and age of user using an array // db.Select([]string{"name", "age"}).Find(&users) func (db *DB) Select(query interface{}, args ...interface{}) (tx *DB) { tx = db.getInstance() switch v := query.(type) {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 24 09:42:59 UTC 2024 - 14.8K bytes - Viewed (0) -
schema/field_test.go
}, Name: "valuer_and_setter", Age: 18, Birthday: tests.Now(), Active: true, } reflectValue = reflect.ValueOf(&user) ) // test valuer values := map[string]interface{}{ "name": user.Name, "id": user.ID, "created_at": user.CreatedAt, "updated_at": user.UpdatedAt, "deleted_at": user.DeletedAt, "age": user.Age, "birthday": user.Birthday,
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sat Feb 19 09:02:53 UTC 2022 - 12.7K bytes - Viewed (0) -
tests/scanner_valuer_test.go
} AssertObjEqual(t, result, data, "Name", "Gender", "Age") if err := DB.Where(data).Assign(ScannerValuerStruct{Age: sql.NullInt64{Int64: 18, Valid: true}}).FirstOrCreate(&result).Error; err != nil { t.Errorf("Should not raise any error, but got %v", err) } if result.Age.Int64 != 18 { t.Errorf("should update age to 18") } var result2 ScannerValuerStruct
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 07 07:02:07 UTC 2023 - 10.6K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/cache/CacheStrategy.kt
private var lastModified: Date? = null private var lastModifiedString: String? = null /** * The expiration date of the cached response, if known. If both this field and the max age are * set, the max age is preferred. */ private var expires: Date? = null /** * Extension header set by OkHttp specifying the timestamp when the cached HTTP request was * first initiated. */
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 15 13:24:48 UTC 2024 - 12K bytes - Viewed (0) -
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) -
okhttp/src/main/kotlin/okhttp3/CacheControl.kt
/** The duration past the response's served date that it can be served without validation. */ @get:JvmName("maxAgeSeconds") val maxAgeSeconds: Int, /** * The "s-maxage" directive is the max age for shared caches. Not to be confused with "max-age" * for non-shared caches, As in Firefox and Chrome, this directive is not honored by this cache. */ @get:JvmName("sMaxAgeSeconds") val sMaxAgeSeconds: Int, val isPrivate: Boolean,
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 15 13:41:01 UTC 2024 - 10K bytes - Viewed (0)