diff --git a/CHANGELOG.md b/CHANGELOG.md index d7efecd7..f91477a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## v1.4.1 + +### Fixed + +- fix `start transaction` support (#386). Thanks @bmbferreira! + ## v1.4.0 - 2024-09-24 ### Added diff --git a/linter/src/rules/prefer_robust_stmts.rs b/linter/src/rules/prefer_robust_stmts.rs index 73376f27..c8dcc5c4 100644 --- a/linter/src/rules/prefer_robust_stmts.rs +++ b/linter/src/rules/prefer_robust_stmts.rs @@ -368,6 +368,23 @@ ALTER TABLE IF EXISTS test DISABLE ROW LEVEL SECURITY; ); } + #[test] + fn test_start_transaction() { + let sql = r#" +START TRANSACTION; + +ALTER TABLE "A" DROP CONSTRAINT "UQ_c4fb579a038211909ee524ccf29"; + +ALTER TABLE "B" DROP CONSTRAINT "UQ_791c01fe9438d66a94490d0da28"; + +ALTER TABLE "C" DROP CONSTRAINT "UQ_23fbf20e8ab4e806941359f4f79"; + +ALTER TABLE "D" DROP CONSTRAINT "UQ_468cad3743146a81c94b0b114ac"; + +COMMIT;"#; + assert_eq!(lint_sql(sql), Ok(vec![])); + } + #[test] fn test_prefer_robust_stmt_failure_cases() { let sql = r#"