- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for NullTime (0.17 sec)
-
schema/serializer.go
type UnixSecondSerializer struct{} // Scan implements serializer interface func (UnixSecondSerializer) Scan(ctx context.Context, field *Field, dst reflect.Value, dbValue interface{}) (err error) { t := sql.NullTime{} if err = t.Scan(dbValue); err == nil && t.Valid { err = field.Set(ctx, dst, t.Time.Unix()) } return } // Value implements serializer interface
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Mar 18 08:28:46 GMT 2024 - 4.6K bytes - Viewed (0) -
utils/utils_test.go
if out := Contains(test.elems, test.elem); test.out != out { t.Errorf("Contains(%v, %s) want: %t, got: %t", test.elems, test.elem, test.out, out) } }) } } type ModifyAt sql.NullTime // Value return a Unix time. func (n ModifyAt) Value() (driver.Value, error) { if !n.Valid { return nil, nil } return n.Time.Unix(), nil } func TestAssertEqual(t *testing.T) {
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) -
scan.go
*uint, *uint8, *uint16, *uint32, *uint64, *uintptr, *float32, *float64, *bool, *string, *time.Time, *sql.NullInt32, *sql.NullInt64, *sql.NullFloat64, *sql.NullBool, *sql.NullString, *sql.NullTime: for initialized || rows.Next() { initialized = false db.RowsAffected++ db.AddError(rows.Scan(dest)) } default: var ( fields = make([]*schema.Field, len(columns))
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Apr 26 09:53:11 GMT 2024 - 9.8K bytes - Viewed (0) -
tests/query_test.go
t.Errorf("got error when pluck time: %v", err) } for idx, tv := range ptrtimes { AssertEqual(t, tv, users[idx].CreatedAt) } var nulltimes []sql.NullTime if err := DB.Model(User{}).Where("name like ?", "pluck-user%").Pluck("created_at", &nulltimes).Error; err != nil { t.Errorf("got error when pluck time: %v", err) } for idx, tv := range nulltimes {
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)