mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-25 00:14:06 +00:00
feat: add mysql show status statement (#1119)
Co-authored-by: Michael Ionov <michael@appdome.com>
This commit is contained in:
parent
bcecd853f7
commit
61089f977c
3 changed files with 66 additions and 0 deletions
|
@ -288,6 +288,36 @@ fn parse_show_columns() {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_show_status() {
|
||||
assert_eq!(
|
||||
mysql_and_generic().verified_stmt("SHOW SESSION STATUS LIKE 'ssl_cipher'"),
|
||||
Statement::ShowStatus {
|
||||
filter: Some(ShowStatementFilter::Like("ssl_cipher".into())),
|
||||
session: true,
|
||||
global: false
|
||||
}
|
||||
);
|
||||
assert_eq!(
|
||||
mysql_and_generic().verified_stmt("SHOW GLOBAL STATUS LIKE 'ssl_cipher'"),
|
||||
Statement::ShowStatus {
|
||||
filter: Some(ShowStatementFilter::Like("ssl_cipher".into())),
|
||||
session: false,
|
||||
global: true
|
||||
}
|
||||
);
|
||||
assert_eq!(
|
||||
mysql_and_generic().verified_stmt("SHOW STATUS WHERE value = 2"),
|
||||
Statement::ShowStatus {
|
||||
filter: Some(ShowStatementFilter::Where(
|
||||
mysql_and_generic().verified_expr("value = 2")
|
||||
)),
|
||||
session: false,
|
||||
global: false
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_show_tables() {
|
||||
assert_eq!(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue