pub struct TransactionSyntax {Show 26 fields
pub start_transaction: bool,
pub start_transaction_block_optional: bool,
pub transaction_work_keyword: bool,
pub begin_transaction_keyword: bool,
pub commit_transaction_keyword: bool,
pub rollback_transaction_keyword: bool,
pub transaction_name: bool,
pub begin_transaction_modes: bool,
pub transaction_savepoints: bool,
pub set_transaction: bool,
pub transaction_isolation_mode: bool,
pub transaction_access_mode: bool,
pub transaction_deferrable_mode: bool,
pub start_transaction_isolation_mode: bool,
pub start_transaction_deferrable_mode: bool,
pub start_transaction_consistent_snapshot: bool,
pub transaction_multiple_modes: bool,
pub transaction_modes_require_commas: bool,
pub transaction_modes_reject_duplicates: bool,
pub abort_transaction_alias: bool,
pub end_transaction_alias: bool,
pub transaction_release: bool,
pub transaction_chain: bool,
pub release_savepoint_keyword_optional: bool,
pub begin_transaction_mode: bool,
pub xa_transactions: bool,
}Expand description
Dialect-owned transaction-control (TCL) syntax accepted by the parser.
Transaction openers, completers, savepoints, mode lists, and XA distributed-transaction
forms — the SQL transaction-control family. Split out of UtilitySyntax so utility
statement-head gates (COPY/PRAGMA/SHOW siblings) are not mixed with TCL grammar and
narrowing validators. Statement-head flags that open TCL statements
(start_transaction, set_transaction, xa_transactions, …) are still consumed by
parser::statement_dispatch / parser::tcl; mode-list validators are read by the TCL
body parser.
Fields§
§start_transaction: boolAccept the standard START TRANSACTION transaction opener. Some engines,
notably SQLite, expose only BEGIN and reject the START spelling.
start_transaction_block_optional: boolAccept START [TRANSACTION | WORK] with the transaction block word omitted or
spelled WORK. When off, the standard START TRANSACTION spelling remains
mandatory. DuckDB accepts all three spellings; PostgreSQL requires
TRANSACTION after START.
transaction_work_keyword: boolAccept WORK as the optional transaction block word on BEGIN, COMMIT, and
ROLLBACK. START WORK is controlled by
start_transaction_block_optional.
begin_transaction_keyword: boolAccept TRANSACTION as the optional block word after BEGIN.
commit_transaction_keyword: boolAccept TRANSACTION as the optional block word after COMMIT.
rollback_transaction_keyword: boolAccept TRANSACTION as the optional block word after ROLLBACK.
transaction_name: boolAccept SQLite’s optional transaction name immediately after an explicit
TRANSACTION block word (BEGIN TRANSACTION name, COMMIT TRANSACTION name,
or ROLLBACK TRANSACTION name).
begin_transaction_modes: boolAccept a standard transaction-mode list after BEGIN [WORK | TRANSACTION].
transaction_savepoints: boolAccept transaction savepoint statements: SAVEPOINT, RELEASE, and
ROLLBACK TO. This controls the complete savepoint statement family.
set_transaction: boolAccept SET TRANSACTION <mode> [, ...].
transaction_isolation_mode: boolAccept ISOLATION LEVEL <level> in a transaction mode list.
transaction_access_mode: boolAccept READ ONLY / READ WRITE in a transaction mode list.
transaction_deferrable_mode: boolAccept DEFERRABLE / NOT DEFERRABLE in a transaction mode list.
start_transaction_isolation_mode: boolAccept ISOLATION LEVEL <level> after START TRANSACTION. When off, the
isolation form can remain available to SET TRANSACTION.
start_transaction_deferrable_mode: boolAccept [NOT] DEFERRABLE after START TRANSACTION. When off, the form can
remain available to SET TRANSACTION.
start_transaction_consistent_snapshot: boolAccept MySQL’s WITH CONSISTENT SNAPSHOT START TRANSACTION characteristic.
transaction_multiple_modes: boolAccept more than one transaction mode, separated by an optional comma.
transaction_modes_require_commas: boolON rejects a missing comma between adjacent transaction modes (MySQL). PostgreSQL permits bare whitespace between modes when this is off.
transaction_modes_reject_duplicates: boolON rejects a repeated transaction-mode kind in one list (MySQL: each characteristic category at most once).
abort_transaction_alias: boolAccept ABORT as an exact ROLLBACK synonym.
end_transaction_alias: boolAccept END as an exact COMMIT synonym.
transaction_release: boolAccept MySQL’s COMMIT|ROLLBACK [NO] RELEASE completion modifier.
transaction_chain: boolAccept COMMIT AND [NO] CHAIN and whole-transaction ROLLBACK AND [NO] CHAIN.
PostgreSQL and SQL-standard transaction chaining; off where the engine grammar lacks it.
release_savepoint_keyword_optional: boolAccept RELEASE <name> without the SAVEPOINT keyword. When off,
RELEASE SAVEPOINT <name> remains available with transaction savepoints.
begin_transaction_mode: boolAccept SQLite’s {DEFERRED | IMMEDIATE | EXCLUSIVE} transaction-mode modifier
between BEGIN and the optional TRANSACTION keyword (stored on
TransactionStatement::Begin’s mode
field). On for SQLite/Lenient; off elsewhere. PostgreSQL’s BEGIN takes its own,
differently-shaped modifier set (ISOLATION LEVEL … / READ ONLY|WRITE / [NOT] DEFERRABLE, the existing TransactionMode list),
deliberately not modelled here, so it stays off there and the leading modifier
keyword falls through to today’s error (engine-probed: pg_query rejects BEGIN DEFERRED/BEGIN IMMEDIATE/BEGIN EXCLUSIVE).
xa_transactions: boolAccept the MySQL XA distributed-transaction family — XA {START | BEGIN} xid [JOIN | RESUME], XA END xid [SUSPEND [FOR MIGRATE]], XA PREPARE xid, XA COMMIT xid [ONE PHASE], XA ROLLBACK xid, and XA RECOVER [CONVERT XID] (the X/Open two-phase-commit
verbs; sql_yacc.yy xa:). One flag gates the whole family because it is a single
dialect unit reached through one unique leading XA keyword (the
kill leading-keyword-gate precedent, not a keyword shared with
another dialect). On for MySQL and the Lenient superset (a pure addition there — no other
dialect claims XA); off elsewhere, where the leading XA keyword is not dispatched and
surfaces as an unknown statement. Live mysql:8.4.10: every grammar-valid form answers
ER_UNSUPPORTED_PS 1295 (recognized, not preparable over the wire). See
XaStatement.
Implementations§
Source§impl TransactionSyntax
impl TransactionSyntax
Sourcepub const DATABRICKS: Self
Available on crate feature databricks only.
pub const DATABRICKS: Self
databricks only.Transaction-control surface for the DATABRICKS preset (split from UtilitySyntax).
Trait Implementations§
Source§impl Clone for TransactionSyntax
impl Clone for TransactionSyntax
Source§fn clone(&self) -> TransactionSyntax
fn clone(&self) -> TransactionSyntax
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more