From 486bd152dca516b8d325bcfa7fc2593365ba5331 Mon Sep 17 00:00:00 2001 From: Maxwell Date: Sun, 15 Mar 2020 19:21:43 +0800 Subject: [PATCH] [parser] model: add invisible option for IndexInfo (#771) * model: add invisible option for IndexInfo * fmt Co-authored-by: kennytm --- parser/model/model.go | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/parser/model/model.go b/parser/model/model.go index 4f3ec5af1a..df4ff2de4d 100644 --- a/parser/model/model.go +++ b/parser/model/model.go @@ -732,15 +732,16 @@ const ( // It corresponds to the statement `CREATE INDEX Name ON Table (Column);` // See https://dev.mysql.com/doc/refman/5.7/en/create-index.html type IndexInfo struct { - ID int64 `json:"id"` - Name CIStr `json:"idx_name"` // Index name. - Table CIStr `json:"tbl_name"` // Table name. - Columns []*IndexColumn `json:"idx_cols"` // Index columns. - Unique bool `json:"is_unique"` // Whether the index is unique. - Primary bool `json:"is_primary"` // Whether the index is primary key. - State SchemaState `json:"state"` - Comment string `json:"comment"` // Comment - Tp IndexType `json:"index_type"` // Index type: Btree, Hash or Rtree + ID int64 `json:"id"` + Name CIStr `json:"idx_name"` // Index name. + Table CIStr `json:"tbl_name"` // Table name. + Columns []*IndexColumn `json:"idx_cols"` // Index columns. + State SchemaState `json:"state"` + Comment string `json:"comment"` // Comment + Tp IndexType `json:"index_type"` // Index type: Btree, Hash or Rtree + Unique bool `json:"is_unique"` // Whether the index is unique. + Primary bool `json:"is_primary"` // Whether the index is primary key. + Invisible bool `json:"is_invisible"` // Whether the index is invisible. } // Clone clones IndexInfo.