Documentation ¶
Index ¶
- Variables
- func JSONScan(dbValue interface{}, value interface{}) error
- func JSONValue(value interface{}) (driver.Value, error)
- type Bool
- type ColumnType
- type DataType
- func (dataType DataType) Is(dataTypes []DataType) bool
- func (dataType DataType) IsBlob() bool
- func (dataType DataType) IsChar() bool
- func (dataType DataType) IsDate() bool
- func (dataType DataType) IsEnum() bool
- func (dataType DataType) IsFixed() bool
- func (dataType DataType) IsFloating() bool
- func (dataType DataType) IsInteger() bool
- func (dataType DataType) IsSet() bool
- func (dataType DataType) IsText() bool
- func (dataType DataType) String() string
- func (dataType DataType) WithArgs(args ...string) string
- type MySQLDatetime
- func (dt MySQLDatetime) Format(layout string) string
- func (dt MySQLDatetime) In(loc *time.Location) MySQLDatetime
- func (dt MySQLDatetime) IsZero() bool
- func (dt MySQLDatetime) MarshalText() ([]byte, error)
- func (dt *MySQLDatetime) Scan(value interface{}) error
- func (dt MySQLDatetime) String() string
- func (dt MySQLDatetime) Unix() int64
- func (dt *MySQLDatetime) UnmarshalText(data []byte) (err error)
- func (dt MySQLDatetime) Value() (driver.Value, error)
- type MySQLTimestamp
- func (dt MySQLTimestamp) Format(layout string) string
- func (dt MySQLTimestamp) In(loc *time.Location) MySQLTimestamp
- func (dt MySQLTimestamp) IsZero() bool
- func (dt MySQLTimestamp) MarshalText() ([]byte, error)
- func (dt *MySQLTimestamp) Scan(value interface{}) error
- func (dt MySQLTimestamp) String() string
- func (dt MySQLTimestamp) Unix() int64
- func (dt *MySQLTimestamp) UnmarshalText(data []byte) (err error)
- func (dt MySQLTimestamp) Value() (driver.Value, error)
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{})
)
View Source
var ValueKeywords = map[string]bool{ "NULL": true, "CURRENT_TIMESTAMP": true, }
Functions ¶
Types ¶
type Bool ¶
type Bool int
openapi:type boolean
func (Bool) MarshalJSON ¶
func (Bool) MarshalText ¶
func (*Bool) UnmarshalJSON ¶
func (*Bool) UnmarshalText ¶
type ColumnType ¶
type ColumnType struct { // type DataType // length Length int64 // 小数点位数 Decimal int64 // todo enum 值 or set Values []string Unsigned bool // [CHARACTER SET utf8 when text] COLLATE utf8_bin Charset string Collate string Zerofill bool NotNull bool Enum enumeration.Enum HasDefault bool Default string // extra AutoIncrement bool OnUpdateByCurrentTimestamp bool Comment string }
func ParseColumnType ¶
func ParseColumnType(sql string) (columnType *ColumnType, err error)
func (ColumnType) DeAlias ¶
func (columnType ColumnType) DeAlias() *ColumnType
func (ColumnType) IsEnum ¶
func (columnType ColumnType) IsEnum() bool
func (ColumnType) String ¶
func (columnType ColumnType) String() string
type MySQLDatetime ¶
swagger: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) Format ¶
func (dt MySQLDatetime) Format(layout string) string
func (MySQLDatetime) In ¶
func (dt MySQLDatetime) In(loc *time.Location) MySQLDatetime
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)
type MySQLTimestamp ¶
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) Format ¶
func (dt MySQLTimestamp) Format(layout string) string
func (MySQLTimestamp) In ¶
func (dt MySQLTimestamp) In(loc *time.Location) MySQLTimestamp
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)
Click to show internal directories.
Click to hide internal directories.