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

XA {START | BEGIN} xid [JOIN | RESUME]: a request to start an XA transaction.

Mirrors Sql_cmd_xa_start. Rule: MYSQL-XA-START-001. BEGIN is a synonym of START and START is written. The statement names no relation and has no facts. Source: https://dev.mysql.com/doc/refman/8.4/en/xa-statements.html. Status: Implemented.

Reading the requestdoctest
$xa = (new \SqlSemantics\Platform\MySql\Semantics())->analyze("xa begin 'g', 'b' resume");
    [$xa->toString(), $xa->statement->option === \SqlSemantics\Platform\MySql\Statement\Server\Transaction\Xa\XaStartOption::Resume] // => ["XA START 'g', 'b' RESUME", true]

Properties§

public Xid $xid
public XaStartOption|null $option = null

Methods§

public function __construct(public Xid $xid, public XaStartOption|null $option = null)

Parameters

$xidXidThe transaction identifier
$optionXaStartOption|nullJOIN or RESUME, when written
public function deriveStatement(Derivation $derivation): void

Refuses a format identifier the release rejects; the request names no relation and no value.

Parameters

$derivationDerivation

Throws

InvalidConstruction When the release does not read the format identifier
Calls 2
public function render(Output $out): void

Writes the request.

Parameters

$outOutput
Calls 1

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 1
Type declarations 1