sqltype

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

对golang的database/sql包中null类型数据进行增强. 轻松实现json序列化与反序列化

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NullBool

type NullBool struct {
	sql.NullBool
}

NullBool 包装一个sql.NullBool. NullBool 实现了Marshaler,Unmarshaler,Scanner接口

func (*NullBool) MarshalJSON

func (v *NullBool) MarshalJSON() ([]byte, error)

NullBool的json序列化

func (*NullBool) Scan

func (v *NullBool) Scan(source interface{}) (err error)

func (*NullBool) UnmarshalJSON

func (v *NullBool) UnmarshalJSON(data []byte) error

NullBool的json反序列化

type NullFloat64

type NullFloat64 struct {
	sql.NullFloat64
}

NullFloat64 包装一个sql.NullFloat64. NullFloat64 实现了Marshaler,Unmarshaler,Scanner接口

func (NullFloat64) MarshalJSON

func (v NullFloat64) MarshalJSON() ([]byte, error)

NullFloat64的json序列化

func (*NullFloat64) Scan

func (v *NullFloat64) Scan(source interface{}) (err error)

func (*NullFloat64) UnmarshalJSON

func (v *NullFloat64) UnmarshalJSON(data []byte) error

NullFloat64的json序列化

type NullInt32

type NullInt32 struct {
	sql.NullInt32
}

NullInt32 包装一个sql.NullInt32. NullInt32 实现了Marshaler,Unmarshaler,Scanner接口

func (NullInt32) MarshalJSON

func (v NullInt32) MarshalJSON() ([]byte, error)

NullInt32的json序列化

func (*NullInt32) Scan

func (v *NullInt32) Scan(source interface{}) (err error)

func (*NullInt32) UnmarshalJSON

func (v *NullInt32) UnmarshalJSON(data []byte) error

NullInt32的json反序列化

type NullInt64

type NullInt64 struct {
	sql.NullInt64
}

NullInt64 包装一个sql.NullInt64. NullInt64 实现了Marshaler,Unmarshaler,Scanner接口

func (NullInt64) MarshalJSON

func (v NullInt64) MarshalJSON() ([]byte, error)

NullInt64的json序列化

func (*NullInt64) Scan

func (v *NullInt64) Scan(source interface{}) (err error)

func (*NullInt64) UnmarshalJSON

func (v *NullInt64) UnmarshalJSON(data []byte) error

NullInt64的json反序列化

type NullString

type NullString struct {
	sql.NullString
}

NullString 包装一个sql.NullString. NullString 实现了Marshaler,Unmarshaler,Scanner接口

func (NullString) MarshalJSON

func (v NullString) MarshalJSON() ([]byte, error)

NullString的json序列化

func (*NullString) Scan

func (v *NullString) Scan(source interface{}) (err error)

func (*NullString) UnmarshalJSON

func (v *NullString) UnmarshalJSON(data []byte) error

NullString的json反序列化

type NullTime

type NullTime struct {
	sql.NullTime
}

NullTime 包装一个sql.NullTime. NullTime 实现了Marshaler,Unmarshaler,Scanner接口

func (NullTime) MarshalJSON

func (v NullTime) MarshalJSON() ([]byte, error)

NullBool的json序列化

func (*NullTime) Scan

func (v *NullTime) Scan(source interface{}) (err error)

func (*NullTime) UnmarshalJSON

func (v *NullTime) UnmarshalJSON(data []byte) error

NullBool的json反序列化

Jump to

Keyboard shortcuts

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