Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions tableparser/tableparser.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ type Table struct {

// Index holds the basic index information
type Index struct {
Name string
Fields []string
Unique bool
Visible bool
Name string
Fields []string
Unique bool
Visible bool
Expression string // MySQL 8.0.16+
}

Expand Down Expand Up @@ -264,7 +264,7 @@ func getIndexes(db *sql.DB, schema, tableName string) (map[string]Index, error)

for rows.Next() {
var i IndexField
var table, string
var table string
fields := []interface{}{&table, &i.NonUnique, &i.KeyName, &i.SeqInIndex,
&i.ColumnName, &i.Collation, &i.Cardinality, &i.SubPart,
&i.Packed, &i.Null, &i.IndexType, &i.Comment, &i.IndexComment,
Expand All @@ -287,7 +287,7 @@ func getIndexes(db *sql.DB, schema, tableName string) (map[string]Index, error)
Name: i.KeyName,
Unique: !i.NonUnique,
Fields: []string{i.ColumnName},
Visible: i.Visible == "YES" || visible == "",
Visible: i.Visible == "YES" || i.Visible == "",
Expression: i.Expression.String,
}

Expand Down