mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-19 13:40:15 +00:00
Support SHOW COLLATION
(#564)
This commit is contained in:
parent
54a29e872d
commit
18881f8fcf
4 changed files with 47 additions and 0 deletions
|
@ -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> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue