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

parser,ast: parse ALTER TABLE .. TRUNCATE PARTITION (#74) #181

Merged
merged 1 commit into from
Jan 16, 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 ast/ddl.go
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,7 @@ const (
AlterTableForce
AlterTableAddPartitions
AlterTableDropPartition
AlterTableTruncatePartition

// TODO: Add more actions
)
Expand Down
4 changes: 3 additions & 1 deletion model/ddl.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ const (
ActionDropTablePartition ActionType = 20
ActionCreateView ActionType = 21
ActionModifyTableCharsetAndCollate ActionType = 22
ActionTruncateTablePartition ActionType = 23
)

// AddIndexStr is a string related to the operation of "add index".
Expand All @@ -77,9 +78,10 @@ var actionMap = map[ActionType]string{
ActionModifyTableComment: "modify table comment",
ActionRenameIndex: "rename index",
ActionAddTablePartition: "add partition",
ActionDropTablePartition: "drop table partition",
ActionDropTablePartition: "drop partition",
ActionCreateView: "create view",
ActionModifyTableCharsetAndCollate: "modify table charset and collate",
ActionTruncateTablePartition: "truncate partition",
}

// String return current ddl action in string
Expand Down
Loading