classCommit
final class Commit
implements Statement
uses Snapshot
Public API: explicitly declared with
@visibility public.A request to commit the current transaction.
Rule: PG-TRANSACTION-002. Mirrors PostgreSQL's TransactionStmt of kind TRANS_STMT_COMMIT with its chain flag. WORK or TRANSACTION after the command has no effect and is not kept. Facts: none; a transaction is the state of a session. Source: https://www.postgresql.org/docs/17/sql-commit.html, https://www.postgresql.org/docs/17/sql-end.html. Status: Implemented.
$operation = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('END AND CHAIN');
[$operation->statement->chaining, $operation->toString()] // => [\SqlSemantics\Platform\PostgreSql\Statement\Utility\Transaction\Chaining::Chain, 'END AND CHAIN']Properties§
public CommitSpelling $spelling = CommitSpelling::Commitpublic Chaining|null $chaining = nullMethods§
public function __construct(
public CommitSpelling $spelling = CommitSpelling::Commit,
public Chaining|null $chaining = null,
)Parameters
$spelling | CommitSpelling | The spelling of the command |
$chaining | Chaining|null | AND CHAIN or AND NO CHAIN, when written |
Calls 1
- class-const CommitSpelling::Commit() line 34
public function deriveStatement(Derivation $derivation): voidDerives nothing: a transaction is the state of a session.
Parameters
$derivation | Derivation |
public function render(Output $out): voidWrites the request.
Parameters
$out | Output |
Calls 2
- method-call Output::keyword() line 50
- function-call
explodeline 52
Test cases 2§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
Other tests reaching this symbol 1
Relations§
Instantiated in 2
- new SqlSemantics\Platform\PostgreSql\Lowering\Utility\TransactionRule::statement() packages/sql-semantics-postgres/src/Lowering/Utility/TransactionRule.php:79
- new SqlSemantics\Platform\PostgreSql\Lowering\Utility\TransactionRule::statement() packages/sql-semantics-postgres/src/Lowering/Utility/TransactionRule.php:80