classXaRule
final class XaRule
Lowers the XA transaction statements.
Rule: MYSQL-XA-001. Scope: xa, xid, begin_or_start, opt_join_or_resume, opt_one_phase, opt_suspend, opt_migrate (5.6), opt_convert_xid (5.7 and later). BEGIN and START are synonyms in XA START (ServerNoise). A global transaction identifier or branch qualifier longer than 64 bytes, and a format identifier above 2^63-1, are syntax errors the server raises in the xid action (MYSQL_YYABORT_UNLESS) and are rejected as such. Constructs: XaStart, XaEnd, XaPrepare, XaCommit, XaRollback, XaRecover, Xid. Terminates: every child is a strict subtree. Source: https://dev.mysql.com/doc/refman/8.4/en/xa-statements.html. Status: Implemented.
Methods§
public function __construct(private Lowering $lowering)Parameters
$lowering | Lowering | The lowering this rule belongs to |
Lowers an XA statement: a node of xa.
Parameters
$form | Form |
Returns
Throws
ImplementationGap When a production has no ruleAnalysisException When an identifier part exceeds its limitCalled from 1
Calls 11
- method-call XaRule::start() line 77
- new XaEnd line 78
- method-call XaRule::xid() line 78
- method-call Form::node() line 78
- method-call XaRule::endOption() line 78
- new XaPrepare line 79
- new XaCommit line 80
- method-call XaRule::flag() line 80
- new XaRollback line 81
- new XaRecover line 82
- static-call ImplementationGap::production() line 84
Lowers XA START or XA BEGIN.
Parameters
$form | Form |
Returns
Throws
ImplementationGap When a production has no ruleAnalysisException When an identifier part exceeds its limitCalled from 1
Calls 5
- method-call XaRule::flag() line 96
- method-call Form::node() line 96
- method-call XaRule::option() line 97
- new XaStart line 99
- method-call XaRule::xid() line 99
public function endOption(Node $option): ?XaEndOptionLowers the option of XA END: a node of opt_suspend.
Parameters
$option | Node |
Returns
Throws
ImplementationGap When a production has no ruleCalled from 1
Calls 5
- method-call Lowering::form() line 109
- class-const XaEndOption::Suspend() line 114
- class-const XaEndOption::SuspendForMigrate() line 115
- static-call ImplementationGap::production() line 116
- method-call XaRule::option() line 119
public function option(Node $option): XaStartOption|XaEndOption|nullLowers an optional option: a node of opt_join_or_resume or opt_suspend.
Parameters
$option | Node |
Returns
XaStartOption|XaEndOption|nullThrows
ImplementationGap When a production has no ruleCalled from 2
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Transaction\XaRule::start() packages/sql-semantics-mysql/src/Lowering/Server/Transaction/XaRule.php:97
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Transaction\XaRule::endOption() packages/sql-semantics-mysql/src/Lowering/Server/Transaction/XaRule.php:119
Calls 4
- method-call Lowering::form() line 131
- function-call
array_key_existsline 132 - class-const XaRule::OPTIONS() line 132
- static-call ImplementationGap::production() line 133
public function flag(Node $flag): boolLowers a flag: a node of opt_one_phase, opt_convert_xid or begin_or_start.
Parameters
$flag | Node |
Returns
boolThrows
ImplementationGap When a production has no ruleCalled from 3
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Transaction\XaRule::statement() packages/sql-semantics-mysql/src/Lowering/Server/Transaction/XaRule.php:80
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Transaction\XaRule::statement() packages/sql-semantics-mysql/src/Lowering/Server/Transaction/XaRule.php:83
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Transaction\XaRule::start() packages/sql-semantics-mysql/src/Lowering/Server/Transaction/XaRule.php:96
Calls 3
- method-call Lowering::form() line 146
- class-const XaRule::FLAGS() line 148
- static-call ImplementationGap::production() line 148
Lowers an XA transaction identifier: a node of xid.
Parameters
$xid | Node |
Returns
Throws
ImplementationGap When a production has no ruleAnalysisException When a part exceeds its limitCalled from 5
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Transaction\XaRule::statement() packages/sql-semantics-mysql/src/Lowering/Server/Transaction/XaRule.php:78
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Transaction\XaRule::statement() packages/sql-semantics-mysql/src/Lowering/Server/Transaction/XaRule.php:79
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Transaction\XaRule::statement() packages/sql-semantics-mysql/src/Lowering/Server/Transaction/XaRule.php:80
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Transaction\XaRule::statement() packages/sql-semantics-mysql/src/Lowering/Server/Transaction/XaRule.php:81
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Transaction\XaRule::start() packages/sql-semantics-mysql/src/Lowering/Server/Transaction/XaRule.php:99
Calls 4
- method-call Lowering::form() line 159
- static-call ImplementationGap::production() line 165
- method-call XaRule::limits() line 167
- new Xid line 169
Rejects identifier parts the server rejects while it parses.
Throws
AnalysisException When a part exceeds its limitCalled from 1
Calls 4
- new Magnitudes line 179
- method-call Magnitudes::bytes() line 180
- new AnalysisException line 181
- method-call Magnitudes::format() line 183
Private surface 3§
Implementation details, listed for orientation only.
private const OPTIONS = ['opt_join_or_resume:' => null, 'opt_join_or_resume: JOIN_SYM' => \SqlSemantics…private const FLAGS = ['opt_one_phase:' => false, 'opt_one_phase: ONE_SYM PHASE_SYM' => true, 'opt_co…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
XaRuleTestcalls