simplesql

package
v0.3.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 23, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToNullTime

func ToNullTime(t time.Time) sql.NullTime

ToNullTime 根据 time 类型快速生成 sql.NullTime

Types

type NullInt64 added in v0.3.5

type NullInt64 struct {
	sql.NullInt64
}

NullInt64 封装 sql.NullInt64 类型

func NewNullInt64 added in v0.3.5

func NewNullInt64(Int64 int64, Valid bool) *NullInt64

NewNullInt64 构造函数

func (NullInt64) MarshalJSON added in v0.3.5

func (n NullInt64) MarshalJSON() (data []byte, err error)

MarshalJSON json 序列化接口

func (*NullInt64) UnmarshalJSON added in v0.3.5

func (n *NullInt64) UnmarshalJSON(b []byte) (err error)

UnmarshalJSON json 反序列化接口

type SecondNullTime

type SecondNullTime struct {
	sql.NullTime
}

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 反序列化接口

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL