Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Constraint ¶
type Constraint struct { ConstraintName string ColumnName string ReferencedTableSchema string ReferencedTableName string ReferencedColumnName string }
Constraint holds Foreign Keys information
type Field ¶
type Field struct { TableCatalog string TableSchema string TableName string ColumnName string OrdinalPosition int ColumnDefault sql.NullString IsNullable bool DataType string CharacterMaximumLength sql.NullInt64 CharacterOctetLength sql.NullInt64 NumericPrecision sql.NullInt64 NumericScale sql.NullInt64 DatetimePrecision sql.NullInt64 CharacterSetName sql.NullString CollationName sql.NullString ColumnType string ColumnKey string Extra string Privileges string ColumnComment string GenerationExpression string SetEnumVals []string Constraint *Constraint SrsID sql.NullString }
Field holds raw field information as defined in INFORMATION_SCHEMA
type Index ¶
type Index struct { Name string Fields []string Unique bool Visible bool Expression string // MySQL 8.0.16+ }
Index holds the basic index information
type IndexField ¶
type IndexField struct { KeyName string SeqInIndex int ColumnName string Collation sql.NullString Cardinality sql.NullInt64 SubPart sql.NullInt64 Packed sql.NullString Null string IndexType string Comment string IndexComment string NonUnique bool Visible string // MySQL 8.0+ Expression sql.NullString // MySQL 8.0.16+ }
IndexField holds raw index information as defined in INFORMATION_SCHEMA table
type Table ¶
type Table struct { Schema string Name string Fields []Field Indexes map[string]Index //TODO Include complete indexes information Constraints []Constraint Triggers []Trigger // contains filtered or unexported fields }
Table holds the table definition with all fields, indexes and triggers
func (*Table) FieldNames ¶
FieldNames returns an string array with the table's field names
type Trigger ¶
type Trigger struct { Trigger string Event string Table string Statement string Timing string Created NullTime SQLMode string Definer string CharacterSetClient string CollationConnection string DatabaseCollation string }
Trigger holds raw trigger information as defined in INFORMATION_SCHEMA
Click to show internal directories.
Click to hide internal directories.