Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ColumnInfo ¶
type ColumnInfo struct { ColumnDefault sql.NullString `db:"column_default"` IsNullable string `db:"is_nullable"` ColumnType string `db:"data_type"` CharacterLength int `db:"character_maximum_length"` ColumnKeysInfo []*IndexInfo }
func GetColumnInfo ¶
func GetColumnInfo(table, column string, db *sqlx.DB) *ColumnInfo
func (*ColumnInfo) GetType ¶
func (ci *ColumnInfo) GetType() string
func (*ColumnInfo) GetUniqueKey ¶
func (ci *ColumnInfo) GetUniqueKey() *IndexInfo
func (*ColumnInfo) HasDefault ¶
func (ci *ColumnInfo) HasDefault() (bool, string)
func (*ColumnInfo) IsPrimary ¶
func (ci *ColumnInfo) IsPrimary() bool
func (*ColumnInfo) IsUnique ¶
func (ci *ColumnInfo) IsUnique() bool
func (*ColumnInfo) Nullable ¶
func (ci *ColumnInfo) Nullable() bool
type IndexInfo ¶
type IndexInfo struct { KeyName string `db:"constraint_name"` KeyType string `db:"constraint_type"` }
func GetIndexInfoByColumn ¶
type KeyInfo ¶
Click to show internal directories.
Click to hide internal directories.