Documentation ¶
Index ¶
Constants ¶
const PrimaryKeyName = "PRIMARY"
PrimaryKeyName defines primary key name.
Variables ¶
This section is empty.
Functions ¶
func CastValues ¶
CastValues casts values based on columns type.
func CheckNotNull ¶
CheckNotNull checks if row has nil value set to a column with NotNull flag set.
func ColDescFieldNames ¶
ColDescFieldNames returns the fields name in result set for desc and show columns.
Types ¶
type Col ¶
type Col struct {
model.ColumnInfo
}
Col provides meta data describing a table column.
func FindOnUpdateCols ¶
FindOnUpdateCols finds columns which have OnUpdateNow flag.
func (*Col) CheckNotNull ¶
CheckNotNull checks if nil value set to a column with NotNull flag is set.
func (*Col) GetTypeDesc ¶
GetTypeDesc gets the description for column type.
func (*Col) IsPKHandleColumn ¶
IsPKHandleColumn checks if the column is primary key handle column.
type ColDesc ¶
type ColDesc struct { Field string Type string Collation string Null string Key string DefaultValue interface{} Extra string Privileges string Comment string }
ColDesc describes column information like MySQL desc and show columns do.
type IndexedCol ¶
IndexedCol defines an index with info.
func (*IndexedCol) FetchValues ¶
FetchValues fetches indexed values from a row.