- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for Time (0.13 sec)
-
tests/create_test.go
} func TestCreateWithNowFuncOverride(t *testing.T) { user := User{Name: "CreateUserTimestampOverride"} curTime := now.MustParse("2016-01-01") NEW := DB.Session(&gorm.Session{ NowFunc: func() time.Time { return curTime }, }) NEW.Save(&user) AssertEqual(t, user.CreatedAt, curTime) AssertEqual(t, user.UpdatedAt, curTime) var newUser User NEW.First(&newUser, user.ID)
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Tue Mar 19 03:50:28 GMT 2024 - 26.4K bytes - Viewed (0) -
callbacks/create_test.go
Age: 18, }, { ID: 2, Name: "bob", Email: "email", Age: 19, }, } stmt := &gorm.Statement{ DB: &gorm.DB{ Config: &gorm.Config{ NowFunc: func() time.Time { return time.Time{} }, }, Statement: &gorm.Statement{ Settings: sync.Map{}, Schema: s, }, }, ReflectValue: reflect.ValueOf(dest), Dest: dest, } stmt.Schema = s
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Mar 18 05:48:42 GMT 2024 - 1.4K bytes - Viewed (0)