mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-23 15:34:09 +00:00
feat: Initial support for parsing MySQL show variables (#559)
Co-authored-by: Alex Vasilev <vaspiring@gmail.com>
This commit is contained in:
parent
231370a770
commit
e2b943799a
4 changed files with 26 additions and 0 deletions
|
@ -3694,6 +3694,13 @@ impl<'a> Parser<'a> {
|
|||
Ok(self.parse_show_columns()?)
|
||||
} else if self.parse_one_of_keywords(&[Keyword::CREATE]).is_some() {
|
||||
Ok(self.parse_show_create()?)
|
||||
} else if self.parse_keyword(Keyword::VARIABLES)
|
||||
&& dialect_of!(self is MySqlDialect | GenericDialect)
|
||||
{
|
||||
// TODO: Support GLOBAL|SESSION
|
||||
Ok(Statement::ShowVariables {
|
||||
filter: self.parse_show_statement_filter()?,
|
||||
})
|
||||
} else {
|
||||
Ok(Statement::ShowVariable {
|
||||
variable: self.parse_identifiers()?,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue