- Sort Score
- Num 10 results
- Language All
Results 21 - 30 of 158 for age (0.07 seconds)
-
tests/generics_test.go
} else if stored.Name != selectOnly.Name || stored.Age != 0 { t.Errorf("unexpected select-only user state, got %#v", stored) } omitAge := User{Name: "GenericsCreateOmitAge", Age: 88} if err := gorm.G[User](DB).Omit("age").Create(ctx, &omitAge); err != nil { t.Fatalf("failed to create with Omit, got error: %v", err) } if omitAge.ID == 0 { t.Fatalf("no primary key found for omit-age user: %v", omitAge) }Created: Sun Apr 05 09:35:12 GMT 2026 - Last Modified: Tue Dec 30 08:11:14 GMT 2025 - 34.9K bytes - Click Count (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) {
Created: Sun Apr 05 09:35:12 GMT 2026 - Last Modified: Mon Jul 21 02:46:58 GMT 2025 - 30.4K bytes - Click Count (0) -
tests/distinct_test.go
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}, {Name: "distinct-3", Age: 18}, } if len(results) != 4 {
Created: Sun Apr 05 09:35:12 GMT 2026 - Last Modified: Thu Jan 06 07:02:53 GMT 2022 - 2.5K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/CacheControlJvmTest.kt
val headers = headersOf("Cache-Control", "max-age=12", "Pragma", "must-revalidate", "Pragma", "public") val cacheControl = parse(headers) assertThat(cacheControl.toString()).isEqualTo("max-age=12, public, must-revalidate") } @Test fun parseCacheControlHeaderValueIsRetained() { val value = "max-age=12" val headers = headersOf("Cache-Control", value)
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Feb 03 22:17:59 GMT 2026 - 7.4K bytes - Click Count (0) -
clause/benchmarks_test.go
clauses := []clause.Interface{clause.Select{}, clause.From{}, clause.Where{Exprs: []clause.Expression{clause.Eq{Column: clause.PrimaryColumn, Value: "1"}, clause.Gt{Column: "age", Value: 18}, clause.Or(clause.Neq{Column: "name", Value: "jinzhu"})}}} for _, clause := range clauses { stmt.AddClause(clause) } stmt.Build("SELECT", "FROM", "WHERE") _ = stmt.SQL.String() } }Created: Sun Apr 05 09:35:12 GMT 2026 - Last Modified: Fri Oct 07 12:14:14 GMT 2022 - 1.9K bytes - Click Count (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
Created: Sun Apr 05 09:35:12 GMT 2026 - Last Modified: Wed Jun 07 07:02:07 GMT 2023 - 10.6K bytes - Click Count (0) -
schema/index_test.go
Comment: "hello , world", Where: "age > 10", Fields: []schema.IndexOption{{Field: &schema.Field{Name: "Name5"}}}, }, { Name: "profile", Comment: "hello , world", Where: "age > 10", Option: "WITH PARSER parser_name", Fields: []schema.IndexOption{{Field: &schema.Field{Name: "Name6"}}, { Field: &schema.Field{Name: "Age"}, Expression: "ABS(age)", }}, }, {
Created: Sun Apr 05 09:35:12 GMT 2026 - Last Modified: Fri Dec 06 02:27:44 GMT 2024 - 7.9K bytes - Click Count (0) -
clause/returning_test.go
}, clause.Returning{ []clause.Column{{Name: "name"}, {Name: "age"}}, }}, "SELECT * FROM `users` RETURNING `users`.`id`,`name`,`age`", nil, }, { []clause.Interface{clause.Select{}, clause.From{}, clause.Returning{ []clause.Column{clause.PrimaryColumn}, }, clause.Returning{}, clause.Returning{ []clause.Column{{Name: "name"}, {Name: "age"}}, }}, "SELECT * FROM `users` RETURNING *", nil, }, {Created: Sun Apr 05 09:35:12 GMT 2026 - Last Modified: Sun Jan 12 10:18:04 GMT 2025 - 1.4K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/CacheTest.kt
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Fri Mar 20 09:13:37 GMT 2026 - 121K bytes - Click Count (0) -
tests/association_generics_test.go
t.Fatalf("expected Company assigned, got %+v", got.Company) } } // Mixed fields + association: update Age and create a pet together func TestClauseAssociationSetUpdateMixedFieldAndAssociation(t *testing.T) { ctx := context.Background() user := User{Name: "TestClauseAssociationSetUpdateMixed", Age: 20} if err := DB.Create(&user).Error; err != nil { t.Fatalf("create user: %v", err) }
Created: Sun Apr 05 09:35:12 GMT 2026 - Last Modified: Fri Sep 12 05:42:26 GMT 2025 - 37.9K bytes - Click Count (0)