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:
sam 2022-10-15 17:34:19 +05:30 committed by GitHub
parent b42632fa0d
commit b32cbbd855
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 33 additions and 2 deletions

View file

@ -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,
})
}