Skip to content

Fixing syntax error left in previous pull request #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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