Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JsonColumn ¶
JsonColumn 是自定义的 JSON 类型字段 Val 字段必须是结构体指针 模仿 sql.NullXXX 模式 构造一个手动转换 json 的类型 将 json 转换成字符串 byte[] 类型,然后存入,取出的时候 手动转换
type SimpleStruct ¶
type SimpleStruct struct {
Id uint64
Bool bool
BoolPtr *bool
Int int
IntPtr *int
Int8 int8
Int8Ptr *int8
Int16 int16
Int16Ptr *int16
Int32 int32
Int32Ptr *int32
Int64 int64
Int64Ptr *int64
Uint uint
UintPtr *uint
Uint8 uint8
Uint8Ptr *uint8
Uint16 uint16
Uint16Ptr *uint16
Uint32 uint32
Uint32Ptr *uint32
Uint64 uint64
Uint64Ptr *uint64
Float32 float32
Float32Ptr *float32
Float64 float64
Float64Ptr *float64
Byte byte
BytePtr *byte
ByteArray []byte
String string
// 特殊类型
NullStringPtr *sql.NullString
NullInt16Ptr *sql.NullInt16
NullInt32Ptr *sql.NullInt32
NullInt64Ptr *sql.NullInt64
NullBoolPtr *sql.NullBool
// NullTimePtr *sql.NullTime
NullFloat64Ptr *sql.NullFloat64
JsonColumn *JsonColumn
}
SimpleStruct 包含所有支持的类型
func NewSimpleStruct ¶
func NewSimpleStruct(id uint64) *SimpleStruct
Click to show internal directories.
Click to hide internal directories.