classTransactionRule
final class TransactionRule
Lowers transaction control commands.
Rule: SQLITE-TRANSACTION-LOWER-001. Scope: the cmd productions of BEGIN, COMMIT, END, ROLLBACK, SAVEPOINT and RELEASE, with transtype, trans_opt and savepoint_opt. Constructors: Begin, Commit, Rollback, RollbackTo, Savepoint, Release. The behavior word and every name are kept; the keywords COMMIT and END, a bare TRANSACTION and the SAVEPOINT before a savepoint name are declared noise. No fact is derived and no diagnostic is emitted. Terminates: every production has a fixed number of children. Source: https://sqlite.org/lang_transaction.html, https://sqlite.org/lang_savepoint.html. Status: Implemented.
Methods§
public function __construct(private Lowering $lowering)Parameters
$lowering | Lowering | The lowering this rule belongs to |
Lowers a transaction control command, or answers null for a command of another family.
Parameters
$form | Form |
Returns
Called from 1
Calls 10
- new Begin line 51
- method-call TransactionRule::behavior() line 51
- method-call Form::node() line 51
- method-call TransactionRule::name() line 51
- new Commit line 52
- new Rollback line 53
- new Savepoint line 54
- new Release line 55
- method-call TransactionRule::savepoint() line 55
- new RollbackTo line 56
public function behavior(Node $type): ?TransactionBehaviorLowers the optional behavior word of BEGIN.
Parameters
$type | Node |
Returns
Throws
ImplementationGap When the production has no ruleCalled from 1
Calls 4
- class-const TransactionBehavior::Deferred() line 72
- class-const TransactionBehavior::Immediate() line 73
- class-const TransactionBehavior::Exclusive() line 74
- static-call ImplementationGap::production() line 75
Lowers the optional TRANSACTION clause to the name it carries, if any.
Parameters
$option | Node |
Returns
?NameThrows
ImplementationGap When the production has no ruleCalled from 4
- method-call SqlSemantics\Platform\Sqlite\Lowering\Definition\TransactionRule::command() packages/sql-semantics-sqlite/src/Lowering/Definition/TransactionRule.php:51
- method-call SqlSemantics\Platform\Sqlite\Lowering\Definition\TransactionRule::command() packages/sql-semantics-sqlite/src/Lowering/Definition/TransactionRule.php:52
- method-call SqlSemantics\Platform\Sqlite\Lowering\Definition\TransactionRule::command() packages/sql-semantics-sqlite/src/Lowering/Definition/TransactionRule.php:53
- method-call SqlSemantics\Platform\Sqlite\Lowering\Definition\TransactionRule::command() packages/sql-semantics-sqlite/src/Lowering/Definition/TransactionRule.php:56
Calls 1
- static-call ImplementationGap::production() line 91
Lowers a savepoint name written after the optional SAVEPOINT keyword.
Returns
Throws
ImplementationGap When the production has no ruleCalled from 2
- method-call SqlSemantics\Platform\Sqlite\Lowering\Definition\TransactionRule::command() packages/sql-semantics-sqlite/src/Lowering/Definition/TransactionRule.php:55
- method-call SqlSemantics\Platform\Sqlite\Lowering\Definition\TransactionRule::command() packages/sql-semantics-sqlite/src/Lowering/Definition/TransactionRule.php:56
Calls 1
- static-call ImplementationGap::production() line 106
Private surface 1§
Implementation details, listed for orientation only.
private Lowering $loweringTest cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
TransactionRuleTestcalls