Documentation
¶
Index ¶
- Variables
- func JSONScan(dbValue interface{}, value interface{}) error
- func JSONValue(value interface{}) (driver.Value, error)
- 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 ZeroCheck
Constants ¶
This section is empty.
Variables ¶
View Source
var ValueKeywords = map[string]bool{ "NULL": true, "CURRENT_TIMESTAMP": true, }
Functions ¶
Types ¶
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 EnumType string Enums map[int][]string 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
Click to show internal directories.
Click to hide internal directories.