Skip to content

Commit 3a31b17

Browse files
authored
add test for start transaction (#389)
1 parent 12aa7b6 commit 3a31b17

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## v1.4.1
11+
12+
### Fixed
13+
14+
- fix `start transaction` support (#386). Thanks @bmbferreira!
15+
1016
## v1.4.0 - 2024-09-24
1117

1218
### Added

linter/src/rules/prefer_robust_stmts.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,23 @@ ALTER TABLE IF EXISTS test DISABLE ROW LEVEL SECURITY;
368368
);
369369
}
370370

371+
#[test]
372+
fn test_start_transaction() {
373+
let sql = r#"
374+
START TRANSACTION;
375+
376+
ALTER TABLE "A" DROP CONSTRAINT "UQ_c4fb579a038211909ee524ccf29";
377+
378+
ALTER TABLE "B" DROP CONSTRAINT "UQ_791c01fe9438d66a94490d0da28";
379+
380+
ALTER TABLE "C" DROP CONSTRAINT "UQ_23fbf20e8ab4e806941359f4f79";
381+
382+
ALTER TABLE "D" DROP CONSTRAINT "UQ_468cad3743146a81c94b0b114ac";
383+
384+
COMMIT;"#;
385+
assert_eq!(lint_sql(sql), Ok(vec![]));
386+
}
387+
371388
#[test]
372389
fn test_prefer_robust_stmt_failure_cases() {
373390
let sql = r#"

0 commit comments

Comments
 (0)