Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Int ¶
type Int int
Int is an alternative type to the standard int type. Int can be mapped to all numeric SQL field types, including floats. NULL value will be scanned as 0. To distinguish zero and null, use nullable.Int instead.
func (Int) GormDataType ¶
GormDataType implements schema.GormDataTypeInterface
func (Int) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
func (*Int) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
type Timestamp ¶
Timestamp is serialized as microsecond-precision unix timestamps in JSON, and can be mapped to the "timestamp" field type in MySQL / TiDB. NULL value will be scanned as unix timestamp 0. To distinguish zero timestamp and null timestamp, use nullable.Timestamp instead.
This struct is only used for compatibility with existing "timestamp" field types. Int should be always preferred to store timestamps wherever possible.
func (Timestamp) GormDataType ¶
GormDataType implements schema.GormDataTypeInterface
func (Timestamp) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
func (*Timestamp) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.