database

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2022 License: MIT Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSON

type JSON []byte

func NewJSON added in v0.0.4

func NewJSON(v interface{}) JSON

func (JSON) Equals

func (j JSON) Equals(j1 JSON) bool

func (JSON) IsNull

func (j JSON) IsNull() bool

func (JSON) MarshalJSON

func (j JSON) MarshalJSON() ([]byte, error)

func (*JSON) Scan

func (j *JSON) Scan(value interface{}) error

func (*JSON) UnmarshalJSON

func (j *JSON) UnmarshalJSON(data []byte) error

func (JSON) Value

func (j JSON) Value() (driver.Value, error)

type Time

type Time struct {
	time.Time
}

func Now

func Now() Time

func NowPointer

func NowPointer() *Time

func (*Time) Scan

func (t *Time) Scan(v interface{}) error

Scan 读取数据库时会调用该方法将时间数据转换成自定义时间类型

func (Time) Value

func (t Time) Value() (driver.Value, error)

Value 写入数据库时会调用该方法将自定义时间类型转换并写入数据库

func (*Time) YmdHis

func (t *Time) YmdHis() string

Jump to

Keyboard shortcuts

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