mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-09-10 07:56:20 +00:00
Support drop sequence statement (#673)
* Add ObjectType Sequence * Drop sequence test cases added. * Parser and Drop statement Display updated. * Parser and Drop statement Display updated. * Fix compile errors * add new test case
This commit is contained in:
parent
b42632fa0d
commit
b32cbbd855
4 changed files with 33 additions and 2 deletions
|
@ -2441,9 +2441,11 @@ impl<'a> Parser<'a> {
|
|||
ObjectType::Role
|
||||
} else if self.parse_keyword(Keyword::SCHEMA) {
|
||||
ObjectType::Schema
|
||||
} else if self.parse_keyword(Keyword::SEQUENCE) {
|
||||
ObjectType::Sequence
|
||||
} else {
|
||||
return self.expected(
|
||||
"TABLE, VIEW, INDEX, ROLE, or SCHEMA after DROP",
|
||||
"TABLE, VIEW, INDEX, ROLE, SCHEMA, or SEQUENCE after DROP",
|
||||
self.peek_token(),
|
||||
);
|
||||
};
|
||||
|
@ -2465,6 +2467,7 @@ impl<'a> Parser<'a> {
|
|||
if_exists,
|
||||
names,
|
||||
cascade,
|
||||
restrict,
|
||||
purge,
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue