- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 1,375 for result2 (0.06 sec)
-
tests/named_argument_test.go
DB.Create(&namedUser) var result NamedUser DB.First(&result, "name1 = @name OR name2 = @name OR name3 = @name", sql.Named("name", "jinzhu2")) AssertEqual(t, result, namedUser) var result2 NamedUser DB.Where("name1 = @name OR name2 = @name OR name3 = @name", sql.Named("name", "jinzhu2")).First(&result2) AssertEqual(t, result2, namedUser) var result3 NamedUser
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Dec 21 11:50:00 UTC 2021 - 2.7K bytes - Viewed (0) -
tests/update_test.go
sort.Slice(result.Pets, func(i, j int) bool { return result.Pets[i].ID < result.Pets[j].ID }) sort.Slice(result.Team, func(i, j int) bool { return result.Team[i].ID < result.Team[j].ID }) sort.Slice(result.Friends, func(i, j int) bool { return result.Friends[i].ID < result.Friends[j].ID }) sort.Slice(result2.Pets, func(i, j int) bool { return result2.Pets[i].ID < result2.Pets[j].ID
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Dec 04 03:50:58 UTC 2023 - 30.3K bytes - Viewed (0) -
tests/hooks_test.go
} var result3 Product2 if err := DB.First(&result3, "name = ?", "Nice2").Error; err != nil { t.Fatalf("Failed to query product, got error: %v", err) } DB.Model(&result3).Update("Price", 800) var result4 Product2 DB.First(&result4, "name = ?", "Nice2") if result4.Price != 600 { t.Errorf("Admin product's price should not be changed, expects: %v, got %v", 600, result4.Price) } }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 17 03:59:06 UTC 2024 - 16.7K bytes - Viewed (0) -
tests/create_test.go
} var result2 User if err := DB.Where("name = ?", "create_from_map_2").First(&result2).Error; err != nil || result2.Age != 19 { t.Fatalf("failed to query data after create from slice of map, got error %v", err) } var result3 User if err := DB.Where("name = ?", "create_from_map_3").First(&result3).Error; err != nil || result3.Age != 20 {
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/customize_field_test.go
t.Fatalf("invalid create/update unix nano time: %#v", result) } result.FieldAllowUpdate = "field_allow_update_updated" result.FieldReadonly = "field_readonly_updated" result.FieldIgnore = "field_ignore_updated" DB.Save(&result) var result2 CustomizeFieldStruct DB.Find(&result2, "name = ?", "create")
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Fri Sep 11 09:33:31 UTC 2020 - 6.9K bytes - Viewed (0) -
internal/config/dns/etcd_dns_test.go
for _, path := range []string{"mydns", "skydns"} { result := msgPath("service.staging.skydns.local.", path) if result != etcdPathSeparator+path+"/local/skydns/staging/service" { t.Errorf("Failure to get domain's path with prefix: %s", result) } } } func TestUnPath(t *testing.T) { result1 := msgUnPath("/skydns/local/cluster/staging/service/") if result1 != "service.staging.cluster.local." {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Sep 26 15:03:08 UTC 2024 - 2.1K bytes - Viewed (0) -
tests/scanner_valuer_test.go
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 07 07:02:07 UTC 2023 - 10.6K bytes - Viewed (0) -
tests/prepared_stmt_test.go
t.Errorf("Failed to commit transaction, got error %v\n", err) } if result := db.Where("name=?", "zzjin").Delete(&User{}); result.Error != nil || result.RowsAffected != 1 { t.Fatalf("Failed, got error: %v, rows affected: %v", result.Error, result.RowsAffected) } tx2 := db.Begin() if result := tx2.Where("name=?", "zzjin").Delete(&User{}); result.Error != nil || result.RowsAffected != 0 {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Aug 22 11:02:05 UTC 2024 - 8.5K bytes - Viewed (0) -
tensorflow/c/eager/c_api_experimental_test.cc
TFE_MonitoringSamplerCellAdd(cell2, 3.0); TF_Buffer* result2 = TF_NewBuffer(); TFE_MonitoringSamplerCellValue(cell2, result2); tensorflow::HistogramProto histogram2; EXPECT_TRUE(histogram2.ParseFromString( {reinterpret_cast<const char*>(result2->data), result2->length})); EXPECT_EQ(histogram2.sum(), 5.0); TF_DeleteBuffer(result2); TFE_MonitoringDeleteSampler2(sampler2);
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Thu Aug 03 03:14:26 UTC 2023 - 31.5K bytes - Viewed (0) -
tests/upsert_test.go
} for _, lang := range langs { var results []Language if err := DB.Find(&results, "code = ?", lang.Code).Error; err != nil { t.Errorf("no error should happen when find languages with code, but got %v", err) } else if len(results) != 1 { t.Errorf("should only find only 1 languages, but got %+v", langs) } else if results[0].Name != lang.Name {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Sep 05 07:39:19 UTC 2022 - 11.4K bytes - Viewed (0)