645 New schema name structure (#646)

This commit is contained in:
AugustoFKL 2022-10-03 09:38:01 -03:00 committed by GitHub
parent 95464ec72c
commit 1ced0f6304
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 109 additions and 2 deletions

View file

@ -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";