- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for Sant (0.24 sec)
-
tests/embedded_struct_test.go
} expectAuthors := []string{"Edward", "George"} for i, post := range egPosts { t.Log(i, post.Author) if want := expectAuthors[i]; post.Author.Name != want { t.Errorf("expected author %s got %s", want, post.Author.Name) } } } func TestEmbeddedPointerTypeStruct(t *testing.T) { type BasePost struct { Id int64 Title string URL string }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu Oct 26 03:58:13 GMT 2023 - 7.3K bytes - Viewed (0) -
chainable_api.go
tx = db.getInstance() tx.Statement.Distinct = true if len(args) > 0 { tx = tx.Select(args[0], args[1:]...) } return } // Select specify fields that you want when querying, creating, updating // // Use Select when you only want a subset of the fields. By default, GORM will select all fields. // Select accepts both string arguments and arrays. // // // Select name and age of user using multiple arguments
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Wed Apr 17 03:38:55 GMT 2024 - 14.3K bytes - Viewed (1) -
tests/callbacks_test.go
if cb := createCallback.Get("c1"); reflect.DeepEqual(cb, c1) { t.Errorf("callbacks tests failed, got: %p, want: %p", cb, c1) } createCallback.Remove("c1") if cb := createCallback.Get("c2"); cb != nil { t.Errorf("callbacks test failed. got: %p, want: nil", cb) } } func TestCallbacksRemove(t *testing.T) { db, _ := gorm.Open(nil, nil) createCallback := db.Callback().Create()
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Tue Mar 26 03:33:36 GMT 2024 - 7.2K bytes - Viewed (0) -
utils/utils_test.go
{"FALSE", false}, {"\u0046alse", false}, } for _, test := range checkTruthTests { t.Run(test.v, func(t *testing.T) { if out := CheckTruth(test.v); out != test.out { t.Errorf("CheckTruth(%s) want: %t, got: %t", test.v, test.out, out) } }) } } func TestToStringKey(t *testing.T) { cases := []struct { values []interface{} key string }{ {[]interface{}{"a"}, "a"},
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Feb 19 03:42:25 GMT 2024 - 3.6K bytes - Viewed (0) -
tests/query_test.go
data int64 } func (t *DoubleInt64) Scan(val interface{}) error { switch v := val.(type) { case int64: t.data = v * 2 return nil default: return fmt.Errorf("DoubleInt64 cant not scan with:%v", v) } } // https://github.com/go-gorm/gorm/issues/5091 func TestQueryScannerWithSingleColumn(t *testing.T) { user := User{Name: "scanner_raw_1", Age: 10} DB.Create(&user)
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu Apr 25 12:22:53 GMT 2024 - 49.8K bytes - Viewed (0)