Skip to content

Add TCL statement support (BEGIN, COMMIT, ROLLBACK, SAVEPOINT) - #7

Open
SanjanaBoggaramJ wants to merge 1 commit into
masterfrom
feature/tcl-statements
Open

Add TCL statement support (BEGIN, COMMIT, ROLLBACK, SAVEPOINT)#7
SanjanaBoggaramJ wants to merge 1 commit into
masterfrom
feature/tcl-statements

Conversation

@SanjanaBoggaramJ

Copy link
Copy Markdown
Collaborator

Summary

  • Wires the existing tcl_statement grammar rule (BEGIN/START TRANSACTION, COMMIT, ROLLBACK, SAVEPOINT, SET TRANSACTION) into statement — it was fully defined but never referenced, so none of these parsed before.
  • Adds the missing ROLLBACK ... TO SAVEPOINT <name> clause to rollback_transaction, per the transactions docs.

Solves the TCL issue mentioned in https://github.com/couchbaselabs/lark_sqlpp/issues/6

Test plan

  • Added test_tcl_statements covering BEGIN/START synonyms, SAVEPOINT, ROLLBACK (bare and TO SAVEPOINT), COMMIT, and a multi-statement transaction script.
  • Confirmed none of these are misclassified as DML or DDL.
  • Full existing test suite passes with no regressions.

Wires the existing but previously unreferenced tcl_statement rule into
statement, and adds the missing ROLLBACK ... TO SAVEPOINT <name> clause
per the N1QL transactions docs.
@SanjanaBoggaramJ
SanjanaBoggaramJ requested a review from chedim August 6, 2026 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant