classForeignServerRule
final class ForeignServerRule
Lowers CREATE, ALTER and DROP SERVER.
Rule: MYSQL-FOREIGN-SERVER-001. Scope: the SERVER alternatives of create, alter and drop (alter and drop in 5.6 and 5.7), server_def (5.6), alter_server_stmt, drop_server_stmt, server_options_list, server_option. Constructs: CreateServer, AlterServer, DropServer, ServerOption. Terminates: the option list is flattened iteratively. Source: https://dev.mysql.com/doc/refman/8.4/en/create-server.html, https://dev.mysql.com/doc/refman/8.4/en/alter-server.html, https://dev.mysql.com/doc/refman/8.4/en/drop-server.html. Status: Implemented.
Methods§
public function __construct(private Lowering $lowering)Parameters
$lowering | Lowering | The lowering this rule belongs to |
Lowers a server statement.
Parameters
$form | Form |
Returns
Throws
ImplementationGap When a production has no ruleCalled from 2
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Instance\ForeignServerRule::statement() packages/sql-semantics-mysql/src/Lowering/Server/Instance/ForeignServerRule.php:63
- method-call SqlSemantics\Platform\MySql\Lowering\Server\StatementRule::area() packages/sql-semantics-mysql/src/Lowering/Server/StatementRule.php:120
Calls 8
- method-call ForeignServerRule::statement() line 63
- method-call Lowering::form() line 63
- method-call Form::node() line 63
- method-call ForeignServerRule::create() line 64
- new AlterServer line 66
- method-call ForeignServerRule::options() line 68
- new DropServer line 70
- static-call ImplementationGap::production() line 74
public function create(Form $form, int $name): CreateServerLowers CREATE SERVER from the position of its name.
Parameters
$form | Form | |
$name | int |
Returns
Throws
ImplementationGap When a production has no ruleCalled from 2
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Instance\ForeignServerRule::statement() packages/sql-semantics-mysql/src/Lowering/Server/Instance/ForeignServerRule.php:64
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Instance\ForeignServerRule::statement() packages/sql-semantics-mysql/src/Lowering/Server/Instance/ForeignServerRule.php:65
Calls 3
- new CreateServer line 87
- method-call Form::node() line 87
- method-call ForeignServerRule::options() line 87
public function options(Node $list): list<ServerOption>Lowers the option list: a node of server_options_list.
Parameters
$list | Node |
Returns
list<ServerOption>Throws
ImplementationGap When a production has no ruleCalled from 2
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Instance\ForeignServerRule::statement() packages/sql-semantics-mysql/src/Lowering/Server/Instance/ForeignServerRule.php:68
- method-call SqlSemantics\Platform\MySql\Lowering\Server\Instance\ForeignServerRule::create() packages/sql-semantics-mysql/src/Lowering/Server/Instance/ForeignServerRule.php:87
Calls 7
- method-call Lowering::form() line 98
- method-call Lists::items() line 100
- new Lists line 100
- class-const ForeignServerRule::OPTIONS() line 102
- static-call ImplementationGap::production() line 102
- new ServerOption line 103
- class-const ServerOptionKind::Port() line 103
Private surface 2§
Implementation details, listed for orientation only.
private const OPTIONS = ['server_option: USER TEXT_STRING_sys' => \SqlSemantics\Platform\MySql\Statemen…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
ForeignServerRuleTestcalls