Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewNullInt32FromInt32Ptr ¶ added in v0.3.20
NewNullInt32FromInt32Ptr 根据 *int32 创建 sql.NullInt32
func NewNullInt64FromInt64Ptr ¶ added in v0.3.20
NewNullInt64FromInt64Ptr 根据 *int64 创建 sql.NullInt64
func NewNullTimeFromTimestampPB ¶ added in v0.3.19
func NewNullTimeFromTimestampPB(source *timestamppb.Timestamp) (result sql.NullTime)
NewNullTimeFromTimestampPB 根据 *timestamppb.Timestamp 创建 sql.NullTime
Types ¶
type NullInt64 ¶ added in v0.3.5
NullInt64 封装 sql.NullInt64 类型
func NewNullInt64 ¶ added in v0.3.5
NewNullInt64 构造函数
func (NullInt64) MarshalJSON ¶ added in v0.3.5
MarshalJSON json 序列化接口
func (*NullInt64) UnmarshalJSON ¶ added in v0.3.5
UnmarshalJSON json 反序列化接口
type SecondNullTime ¶
SecondNullTime 精确到秒
func ToSecondNullTime ¶
func ToSecondNullTime(t time.Time) SecondNullTime
ToNullTime 根据 time类型快速生成 SecondNullTime
func (*SecondNullTime) MarshalJSON ¶
func (s *SecondNullTime) MarshalJSON() (data []byte, err error)
MarshalJSON json 序列化接口
func (*SecondNullTime) UnmarshalJSON ¶
func (s *SecondNullTime) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON json 反序列化接口
Click to show internal directories.
Click to hide internal directories.