mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-07-09 18:04:59 +00:00
Support parsing multiple show variables. (#290)
* feat: support parsing multiple show variables. * fix: fix fmt error
This commit is contained in:
parent
f40955ee82
commit
07342d5853
3 changed files with 26 additions and 7 deletions
|
@ -443,19 +443,19 @@ fn parse_set() {
|
|||
|
||||
#[test]
|
||||
fn parse_show() {
|
||||
let stmt = pg_and_generic().verified_stmt("SHOW a");
|
||||
let stmt = pg_and_generic().verified_stmt("SHOW a a");
|
||||
assert_eq!(
|
||||
stmt,
|
||||
Statement::ShowVariable {
|
||||
variable: "a".into()
|
||||
variable: vec!["a".into(), "a".into()]
|
||||
}
|
||||
);
|
||||
|
||||
let stmt = pg_and_generic().verified_stmt("SHOW ALL");
|
||||
let stmt = pg_and_generic().verified_stmt("SHOW ALL ALL");
|
||||
assert_eq!(
|
||||
stmt,
|
||||
Statement::ShowVariable {
|
||||
variable: "ALL".into()
|
||||
variable: vec!["ALL".into(), "ALL".into()]
|
||||
}
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue