datatypes

package
v2.2.5 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2018 License: MIT Imports: 7 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UTC                    = time.UTC
	CST                    = time.FixedZone("CST", 8*60*60)
	MySQLTimestampZero     = MySQLTimestamp(time.Time{})
	MySQLTimestampUnixZero = MySQLTimestamp(time.Unix(0, 0))
)
View Source
var (
	MySQLDatetimeZero = MySQLDatetime(time.Time{})
)

Functions

func JSONScan

func JSONScan(dbValue interface{}, value interface{}) error

func JSONValue

func JSONValue(value interface{}) (driver.Value, error)

Types

type Bool

type Bool int

openapi:type boolean

const (
	BOOL_UNKNOWN Bool = iota
	BOOL_TRUE         // true
	BOOL_FALSE        // false
)

func (Bool) MarshalJSON

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

func (Bool) MarshalText

func (v Bool) MarshalText() ([]byte, error)

func (*Bool) UnmarshalJSON

func (v *Bool) UnmarshalJSON(data []byte) (err error)

func (*Bool) UnmarshalText

func (v *Bool) UnmarshalText(data []byte) (err error)

type MySQLDatetime

type MySQLDatetime time.Time

openapi:strfmt date-time

func ParseMySQLDatetimeFromString

func ParseMySQLDatetimeFromString(s string) (dt MySQLDatetime, err error)

func ParseMySQLDatetimeFromStringWithFormatterInCST

func ParseMySQLDatetimeFromStringWithFormatterInCST(s, formatter string) (dt MySQLDatetime, err error)

func (MySQLDatetime) DataType

func (MySQLDatetime) DataType(e string) string

func (MySQLDatetime) Format

func (dt MySQLDatetime) Format(layout string) string

func (MySQLDatetime) In

func (MySQLDatetime) IsZero

func (dt MySQLDatetime) IsZero() bool

func (MySQLDatetime) MarshalText

func (dt MySQLDatetime) MarshalText() ([]byte, error)

func (*MySQLDatetime) Scan

func (dt *MySQLDatetime) Scan(value interface{}) error

func (MySQLDatetime) String

func (dt MySQLDatetime) String() string

func (MySQLDatetime) Unix

func (dt MySQLDatetime) Unix() int64

func (*MySQLDatetime) UnmarshalText

func (dt *MySQLDatetime) UnmarshalText(data []byte) (err error)

func (MySQLDatetime) Value

func (dt MySQLDatetime) Value() (driver.Value, error)

type MySQLTimestamp

type MySQLTimestamp time.Time

openapi:strfmt date-time

func ParseMySQLTimestampFromString

func ParseMySQLTimestampFromString(s string) (dt MySQLTimestamp, err error)

func ParseMySQLTimestampFromStringWithLayout

func ParseMySQLTimestampFromStringWithLayout(input, layout string) (MySQLTimestamp, error)

func (*MySQLTimestamp) DataType

func (dt *MySQLTimestamp) DataType(engine string) string

func (MySQLTimestamp) Format

func (dt MySQLTimestamp) Format(layout string) string

func (MySQLTimestamp) In

func (MySQLTimestamp) IsZero

func (dt MySQLTimestamp) IsZero() bool

func (MySQLTimestamp) MarshalText

func (dt MySQLTimestamp) MarshalText() ([]byte, error)

func (*MySQLTimestamp) Scan

func (dt *MySQLTimestamp) Scan(value interface{}) error

func (MySQLTimestamp) String

func (dt MySQLTimestamp) String() string

func (MySQLTimestamp) Unix

func (dt MySQLTimestamp) Unix() int64

func (*MySQLTimestamp) UnmarshalText

func (dt *MySQLTimestamp) UnmarshalText(data []byte) (err error)

func (MySQLTimestamp) Value

func (dt MySQLTimestamp) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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