- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 13 for Name2 (0.03 sec)
-
tests/named_argument_test.go
t.Errorf("failed to update with named arg") } AssertEqual(t, result4, namedUser) if err := DB.Exec("UPDATE named_users SET name1 = @name, name2 = @name2, name3 = @name", sql.Named("name", "jinzhu-new"), sql.Named("name2", "jinzhu-new2")).Error; err != nil { t.Errorf("failed to update with named arg") }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Dec 21 11:50:00 UTC 2021 - 2.7K bytes - Viewed (0) -
clause/expression_test.go
SQL: "name1 = @name1 AND name2 = @name2 AND name3 = @name1", Vars: []interface{}{sql.Named("name1", "jinzhu"), sql.Named("name2", "jinzhu2")}, Result: "name1 = ? AND name2 = ? AND name3 = ?", ExpectedVars: []interface{}{"jinzhu", "jinzhu2", "jinzhu"}, }, { SQL: "name1 = @name1 AND name2 = @name2 AND name3 = @name1", Vars: []interface{}{map[string]interface{}{"name1": "jinzhu", "name2": "jinzhu2"}},
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Aug 10 05:34:33 UTC 2023 - 8.4K bytes - Viewed (0) -
tests/default_value_test.go
"time" "gorm.io/gorm" ) func TestDefaultValue(t *testing.T) { type Harumph struct { gorm.Model Email string `gorm:"not null;index:,unique"` Name string `gorm:"notNull;default:foo"` Name2 string `gorm:"size:233;not null;default:'foo'"` Name3 string `gorm:"size:233;notNull;default:''"` Age int `gorm:"default:18"` Created time.Time `gorm:"default:2000-01-02"`
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Apr 08 03:29:55 UTC 2024 - 2.3K bytes - Viewed (0) -
schema/constraint_test.go
package schema_test import ( "reflect" "sync" "testing" "gorm.io/gorm/schema" "gorm.io/gorm/utils/tests" ) type UserCheck struct { Name string `gorm:"check:name_checker,name <> 'jinzhu'"` Name2 string `gorm:"check:name <> 'jinzhu'"` Name3 string `gorm:"check:,name <> 'jinzhu'"` } func TestParseCheck(t *testing.T) { user, err := schema.Parse(&UserCheck{}, &sync.Map{}, schema.NamingStrategy{}) if err != nil {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sun Feb 04 07:49:19 UTC 2024 - 2.2K bytes - Viewed (0) -
internal/ioutil/ioutil_test.go
defer os.Remove(name1) f.WriteString("aaaaaaaaaa") f.Close() f, err = os.CreateTemp("", "") if err != nil { t.Fatal(err) } name2 := f.Name() defer os.Remove(name2) f.WriteString("bbbbbbbbbb") f.Close() if err = AppendFile(name1, name2, false); err != nil { t.Error(err) } b, err := os.ReadFile(name1) if err != nil { t.Error(err) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed May 22 23:07:14 UTC 2024 - 5.5K bytes - Viewed (0) -
schema/index_test.go
package schema_test import ( "sync" "testing" "gorm.io/gorm/schema" "gorm.io/gorm/utils/tests" ) type UserIndex struct { Name string `gorm:"index"` Name2 string `gorm:"index:idx_name,unique"` Name3 string `gorm:"index:,sort:desc,collate:utf8,type:btree,length:10,where:name3 != 'jinzhu'"` Name4 string `gorm:"uniqueIndex"`
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sun Feb 04 07:49:19 UTC 2024 - 8K bytes - Viewed (0) -
cmd/os-readdir_test.go
} // Symlink will not be added to entries. if err := os.Symlink(filepath.Join(dir, name1), filepath.Join(dir, name2)); err != nil { t.Fatalf("Unable to create a symlink, %s", err) } // Add to entries. entries = append(entries, name1) // Symlinks are preserved for regular files entries = append(entries, name2) } if err := os.MkdirAll(filepath.Join(dir, "mydir"), 0o777); err != nil {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 19 18:05:16 UTC 2022 - 7.5K bytes - Viewed (0) -
schema/field_test.go
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
Password: EncryptedData("pass1"), Bytes: []byte("byte"), Num: 18, Strings: StringsSlice{"a", "b", "c"}, Structs: StructsSlice{ {"name1", "value1"}, {"name2", "value2"}, }, Role: Role{Name: "admin"}, ExampleStruct: ExampleStruct{"name", "value1"}, ExampleStructPtr: &ExampleStruct{"name", "value2"}, } if err := DB.Create(&data).Error; err != nil {
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/update_test.go
t.Errorf("should create language, rows affected: %v", result.RowsAffected) } var result Language DB.First(&result, "code = ?", "save") AssertEqual(t, result, lang) lang.Name = "save name2" if result := DB.Save(&lang); result.RowsAffected != 1 { t.Errorf("should update language") } var result2 Language DB.First(&result2, "code = ?", "save") AssertEqual(t, result2, lang)
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Dec 04 03:50:58 UTC 2023 - 30.3K bytes - Viewed (0)