final class Begin
    implements Statement
    uses Snapshot
Public API: explicitly declared with @visibility public.

A request to start a transaction.

Rule: SQLITE-BEGIN-001. A start without a behavior word is deferred, as one with DEFERRED is; the model keeps which of the two was written. SQLite reads a name after TRANSACTION and ignores it. The statement reads no relation and returns no rows. Source: https://sqlite.org/lang_transaction.html. Status: Implemented.

Reading a transaction startdoctest
$begin = (new \SqlSemantics\Platform\Sqlite\Semantics())->analyze('BEGIN EXCLUSIVE TRANSACTION');
    [$begin->statement->behavior?->value, $begin->toString()] // => ['EXCLUSIVE', 'BEGIN EXCLUSIVE']

Properties§

public TransactionBehavior|null $behavior = null
public Name|null $name = null

Methods§

public function __construct(
    public TransactionBehavior|null $behavior = null,
    public Name|null $name = null,
)

Parameters

$behaviorTransactionBehavior|nullThe written behavior word; null requests the deferred default
$nameName|nullThe name written after TRANSACTION, which SQLite ignores
public function effectiveBehavior(): TransactionBehavior
public function deriveStatement(Derivation $derivation): void

Derives nothing: the request depends on no declaration.

Parameters

$derivationDerivation
public function render(Output $out): void

Writes the request.

Parameters

$outOutput
Calls 2

Test cases 8§

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

Dedicated tests 3
Other tests reaching this symbol 5

Relations§

Instantiated in 1