classStatementRule
final class StatementRule
Restricted visibility: declared "@visibility SqlSemantics\Platform\MySql\Lowering\Server". Code outside that scope must not name this declaration.
Hands a statement rule of the server family to the rule class of its area.
Rule: MYSQL-SERVER-STATEMENT-001. Scope: the statement rules that MYSQL-STATEMENT-ROUTES-001 routes to the server family. Each rule name belongs to one area; the area's rule class reads the production. Terminates: one lookup. Source: https://dev.mysql.com/doc/refman/8.4/en/sql-server-administration-statements.html. Status: Implemented.
Methods§
public function __construct(private Lowering $lowering)Parameters
$lowering | Lowering | The lowering this rule belongs to |
Lowers a statement node of the server family.
Parameters
$statement | Node |
Returns
Throws
ImplementationGap When the rule or a production has no ruleAnalysisException When the server rejects the statement while it parses itCalled from 2
- method-call SqlSemantics\Platform\MySql\Lowering\Server\ServerRules::statement() packages/sql-semantics-mysql/src/Lowering/Server/ServerRules.php:48
- method-call SqlSemantics\Platform\MySql\Lowering\Server\StatementRule::definition() packages/sql-semantics-mysql/src/Lowering/Server/StatementRule.php:94
Calls 4
- method-call Lowering::form() line 80
- method-call StatementRule::area() line 82
- class-const StatementRule::AREAS() line 82
- static-call ImplementationGap::production() line 82
Lowers a production of create, alter or drop routed to the server family.
Parameters
$form | Form |
Returns
Throws
ImplementationGap When the production has no ruleAnalysisException When the server rejects the statement while it parses itCalled from 1
Calls 6
- method-call StatementRule::statement() line 94
- method-call Form::node() line 94
- function-call
explodeline 96 - method-call StatementRule::area() line 98
- class-const StatementRule::DEFINITIONS() line 98
- static-call ImplementationGap::production() line 98
Lowers a production through the rule class of an area.
Parameters
$area | string | |
$form | Form |
Returns
Throws
ImplementationGap When a production has no ruleAnalysisException When the server rejects the statement while it parses itCalled from 2
- method-call SqlSemantics\Platform\MySql\Lowering\Server\StatementRule::statement() packages/sql-semantics-mysql/src/Lowering/Server/StatementRule.php:82
- method-call SqlSemantics\Platform\MySql\Lowering\Server\StatementRule::definition() packages/sql-semantics-mysql/src/Lowering/Server/StatementRule.php:98
Calls 27
- method-call TransactionRule::statement() line 110
- new TransactionRule line 110
- method-call XaRule::statement() line 111
- new XaRule line 111
- method-call LockRule::statement() line 112
- new LockRule line 112
- method-call MaintenanceRule::statement() line 113
- new MaintenanceRule line 113
- method-call KeyCacheRule::statement() line 114
- new KeyCacheRule line 114
- method-call FlushRule::statement() line 115
- new FlushRule line 115
- method-call InstanceRule::statement() line 116
- new InstanceRule line 116
- method-call PluginRule::statement() line 117
- new PluginRule line 117
- method-call SpatialRule::statement() line 118
- new SpatialRule line 118
- method-call DatabaseRule::statement() line 119
- new DatabaseRule line 119
- method-call ForeignServerRule::statement() line 120
- new ForeignServerRule line 120
- method-call TablespaceRule::statement() line 121
- new TablespaceRule line 121
- method-call LogfileGroupRule::statement() line 122
- new LogfileGroupRule line 122
- static-call ImplementationGap::production() line 123
Private surface 3§
Implementation details, listed for orientation only.
private const AREAS = ['begin' => 'transaction', 'begin_stmt' => 'transaction', 'start' => 'transacti…private const DEFINITIONS = ['DATABASE' => 'database', 'LOGFILE_SYM' => 'logfile', 'TABLESPACE' => 'tablesp…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
StatementRuleTestcalls