mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-31 03:07:20 +00:00
645 New schema name structure (#646)
This commit is contained in:
parent
95464ec72c
commit
1ced0f6304
3 changed files with 109 additions and 2 deletions
|
@ -2133,6 +2133,30 @@ fn parse_create_schema() {
|
|||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_create_schema_with_authorization() {
|
||||
let sql = "CREATE SCHEMA AUTHORIZATION Y";
|
||||
|
||||
match verified_stmt(sql) {
|
||||
Statement::CreateSchema { schema_name, .. } => {
|
||||
assert_eq!(schema_name.to_string(), "AUTHORIZATION Y".to_owned())
|
||||
}
|
||||
_ => unreachable!(),
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_create_schema_with_name_and_authorization() {
|
||||
let sql = "CREATE SCHEMA X AUTHORIZATION Y";
|
||||
|
||||
match verified_stmt(sql) {
|
||||
Statement::CreateSchema { schema_name, .. } => {
|
||||
assert_eq!(schema_name.to_string(), "X AUTHORIZATION Y".to_owned())
|
||||
}
|
||||
_ => unreachable!(),
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_drop_schema() {
|
||||
let sql = "DROP SCHEMA X";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue