final class TransactionRule
Restricted visibility: declared "@visibility SqlSemantics\Platform\PostgreSql\Lowering". Code outside that scope must not name this declaration.

Lowers the transaction commands.

Rule: PG-TRANSACTION-LOWER-001. Scope: TransactionStmt, TransactionStmtLegacy, opt_transaction, opt_transaction_chain, transaction_mode_list_or_empty, transaction_mode_list, transaction_mode_item, iso_level. Constructors: Begin, Commit, Rollback, SavepointCommand, PreparedTransaction. WORK and TRANSACTION after a command, SAVEPOINT after RELEASE and ROLLBACK TO, and the comma between modes are noise (UtilityNoise). Termination: the mode list is flattened iteratively. Source: https://www.postgresql.org/docs/17/sql-begin.html, https://www.postgresql.org/docs/17/sql-commit.html, https://www.postgresql.org/docs/17/sql-rollback.html, https://www.postgresql.org/docs/17/sql-savepoint.html, https://www.postgresql.org/docs/17/sql-prepare-transaction.html, https://www.postgresql.org/docs/17/sql-set-transaction.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe hub
public function optionalModes(Node $list, ?Node $word = null): list<TransactionMode>
public function mode(Node $item): TransactionMode

Lowers transaction_mode_item with its iso_level.

Parameters

$itemNode

Throws

ImplementationGap When the production has no rule
Called from 1
Calls 2

Private surface 2§

Implementation details, listed for orientation only.

private const MODES = ['transaction_mode_item: READ ONLY' => \SqlSemantics\Platform\PostgreSql\Statem…
private Lowering $lowering

Test cases 1§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 1

Relations§

Instantiated in 2
Method calls 3