Skip to content

Commit

Permalink
model: add invisible option for IndexInfo (#771)
Browse files Browse the repository at this point in the history
* model: add invisible option for IndexInfo

* fmt

Co-authored-by: kennytm <kennytm@gmail.com>
  • Loading branch information
Deardrops and kennytm authored Mar 15, 2020
1 parent f6c2348 commit 3dc646c
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions model/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 3dc646c

Please sign in to comment.