Support SHOW COLLATION (#564)

This commit is contained in:
Alex Qyoun-ae 2022-08-11 17:28:34 +04:00 committed by GitHub
parent 54a29e872d
commit 18881f8fcf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 47 additions and 0 deletions

View file

@ -3758,6 +3758,8 @@ impl<'a> Parser<'a> {
))
} else if self.parse_one_of_keywords(&[Keyword::CREATE]).is_some() {
Ok(self.parse_show_create()?)
} else if self.parse_keyword(Keyword::COLLATION) {
Ok(self.parse_show_collation()?)
} else if self.parse_keyword(Keyword::VARIABLES)
&& dialect_of!(self is MySqlDialect | GenericDialect)
{
@ -3841,6 +3843,11 @@ impl<'a> Parser<'a> {
})
}
pub fn parse_show_collation(&mut self) -> Result<Statement, ParserError> {
let filter = self.parse_show_statement_filter()?;
Ok(Statement::ShowCollation { filter })
}
pub fn parse_show_statement_filter(
&mut self,
) -> Result<Option<ShowStatementFilter>, ParserError> {