Skip to content
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

add support for RTREE index #433

Merged
merged 2 commits into from
Aug 5, 2019
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions misc.go
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,7 @@ var tokenMap = map[string]int{
"ROW": row,
"ROW_COUNT": rowCount,
"ROW_FORMAT": rowFormat,
"RTREE": rtree,
"SCHEMA": database,
"SCHEMAS": databases,
"SECOND": second,
Expand Down
5 changes: 4 additions & 1 deletion model/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -629,6 +629,8 @@ func (t IndexType) String() string {
return "BTREE"
case IndexTypeHash:
return "HASH"
case IndexTypeRtree:
return "RTREE"
default:
return ""
}
Expand All @@ -639,6 +641,7 @@ const (
IndexTypeInvalid IndexType = iota
IndexTypeBtree
IndexTypeHash
IndexTypeRtree
)

// IndexInfo provides meta data describing a DB index.
Expand All @@ -653,7 +656,7 @@ type IndexInfo struct {
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 or Hash
Tp IndexType `json:"index_type"` // Index type: Btree, Hash or Rtree
}

// Clone clones IndexInfo.
Expand Down
Loading