mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-10-07 12:40:22 +00:00
MySQL: Support ALTER TABLE RENAME AS
(#1965)
Some checks failed
Rust / test (stable) (push) Has been cancelled
license / Release Audit Tool (RAT) (push) Has been cancelled
Rust / codestyle (push) Has been cancelled
Rust / lint (push) Has been cancelled
Rust / benchmark-lint (push) Has been cancelled
Rust / compile (push) Has been cancelled
Rust / docs (push) Has been cancelled
Rust / compile-no-std (push) Has been cancelled
Rust / test (beta) (push) Has been cancelled
Rust / test (nightly) (push) Has been cancelled
Some checks failed
Rust / test (stable) (push) Has been cancelled
license / Release Audit Tool (RAT) (push) Has been cancelled
Rust / codestyle (push) Has been cancelled
Rust / lint (push) Has been cancelled
Rust / benchmark-lint (push) Has been cancelled
Rust / compile (push) Has been cancelled
Rust / docs (push) Has been cancelled
Rust / compile-no-std (push) Has been cancelled
Rust / test (beta) (push) Has been cancelled
Rust / test (nightly) (push) Has been cancelled
This commit is contained in:
parent
3583514602
commit
698154d0e0
4 changed files with 62 additions and 10 deletions
|
@ -8752,7 +8752,14 @@ impl<'a> Parser<'a> {
|
|||
AlterTableOperation::RenameConstraint { old_name, new_name }
|
||||
} else if self.parse_keyword(Keyword::TO) {
|
||||
let table_name = self.parse_object_name(false)?;
|
||||
AlterTableOperation::RenameTable { table_name }
|
||||
AlterTableOperation::RenameTable {
|
||||
table_name: RenameTableNameKind::To(table_name),
|
||||
}
|
||||
} else if self.parse_keyword(Keyword::AS) {
|
||||
let table_name = self.parse_object_name(false)?;
|
||||
AlterTableOperation::RenameTable {
|
||||
table_name: RenameTableNameKind::As(table_name),
|
||||
}
|
||||
} else {
|
||||
let _ = self.parse_keyword(Keyword::COLUMN); // [ COLUMN ]
|
||||
let old_column_name = self.parse_identifier()?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue