mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-07-14 03:54:59 +00:00
Support global
,local
, on commit
for create temporary table
(#456)
* feat: add global,local / on commit for create temp tables * chore: minor refactor * chore: clippy fix
This commit is contained in:
parent
278345d21a
commit
0924870d11
4 changed files with 81 additions and 2 deletions
|
@ -1347,6 +1347,21 @@ fn parse_quoted_identifier() {
|
|||
pg_and_generic().verified_stmt(r#"SELECT "quoted "" ident""#);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_local_and_global() {
|
||||
pg_and_generic().verified_stmt("CREATE LOCAL TEMPORARY TABLE table (COL INT)");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_on_commit() {
|
||||
pg_and_generic()
|
||||
.verified_stmt("CREATE TEMPORARY TABLE table (COL INT) ON COMMIT PRESERVE ROWS");
|
||||
|
||||
pg_and_generic().verified_stmt("CREATE TEMPORARY TABLE table (COL INT) ON COMMIT DELETE ROWS");
|
||||
|
||||
pg_and_generic().verified_stmt("CREATE TEMPORARY TABLE table (COL INT) ON COMMIT DROP");
|
||||
}
|
||||
|
||||
fn pg() -> TestedDialects {
|
||||
TestedDialects {
|
||||
dialects: vec![Box::new(PostgreSqlDialect {})],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue