Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Grammar: Tidy up transaction statements in Snowflake dialect (#2196)
Co-authored-by: Barry Pollard <barry@tunetheweb.com>
- Loading branch information
1 parent
909bd57
commit 212432f
Showing
3 changed files
with
102 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
test/fixtures/dialects/snowflake/snowflake_transactions.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
begin; | ||
begin work; | ||
begin transaction; | ||
begin name t4; | ||
begin work name t4; | ||
begin transaction name t4; | ||
start transaction; | ||
start transaction name t4; | ||
rollback; | ||
commit; |
65 changes: 65 additions & 0 deletions
65
test/fixtures/dialects/snowflake/snowflake_transactions.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# YML test files are auto-generated from SQL files and should not be edited by | ||
# hand. To help enforce this, the "hash" field in the file must match a hash | ||
# computed by SQLFluff when running the tests. Please run | ||
# `python test/generate_parse_fixture_yml.py` to generate them after adding or | ||
# altering SQL files. | ||
_hash: edb9a85fc338df4d07be8e6d5881efc1fa5f83ff480d508ee17409dddbb99093 | ||
file: | ||
- statement: | ||
base: | ||
keyword: begin | ||
- statement_terminator: ; | ||
- statement: | ||
base: | ||
- keyword: begin | ||
- keyword: work | ||
- statement_terminator: ; | ||
- statement: | ||
base: | ||
- keyword: begin | ||
- keyword: transaction | ||
- statement_terminator: ; | ||
- statement: | ||
base: | ||
- keyword: begin | ||
- keyword: name | ||
- object_reference: | ||
identifier: t4 | ||
- statement_terminator: ; | ||
- statement: | ||
base: | ||
- keyword: begin | ||
- keyword: work | ||
- keyword: name | ||
- object_reference: | ||
identifier: t4 | ||
- statement_terminator: ; | ||
- statement: | ||
base: | ||
- keyword: begin | ||
- keyword: transaction | ||
- keyword: name | ||
- object_reference: | ||
identifier: t4 | ||
- statement_terminator: ; | ||
- statement: | ||
base: | ||
- keyword: start | ||
- keyword: transaction | ||
- statement_terminator: ; | ||
- statement: | ||
base: | ||
- keyword: start | ||
- keyword: transaction | ||
- keyword: name | ||
- object_reference: | ||
identifier: t4 | ||
- statement_terminator: ; | ||
- statement: | ||
base: | ||
keyword: rollback | ||
- statement_terminator: ; | ||
- statement: | ||
base: | ||
keyword: commit | ||
- statement_terminator: ; |