classSourceOptionRule
final class SourceOptionRule
Lowers one option of CHANGE MASTER TO or CHANGE REPLICATION SOURCE TO, or one log position of UNTIL.
Rule: MYSQL-SOURCE-OPTION-001. Scope: master_def, master_file_def (5.6, 5.7), source_def, source_file_def, source_log_file, source_log_pos and the change_replication_source_* keyword rules (8.0 and later). Each option production names one field of LEX_SOURCE_INFO (SourceOptionKind); from 8.0 to 8.3 an option keyword is a rule of its own whose MASTER_ and SOURCE_ alternatives are synonyms (the parser fills the same field and adds a deprecation warning for the MASTER_ one), so the option takes the vocabulary of the statement, which is the one of the release. The value is lowered by the leaf rules or by MYSQL-SOURCE-VALUE-001. Constructs: SourceOption. Terminates: unit productions over strict subtrees. Source: https://dev.mysql.com/doc/refman/8.4/en/change-replication-source-to.html, https://dev.mysql.com/doc/refman/8.0/en/change-master-to.html. Status: Implemented.
Methods§
public function __construct(private Lowering $lowering)Parameters
$lowering | Lowering | The lowering this rule belongs to |
public function option(Node $option, Terminology $terminology): SourceOptionLowers one option in the vocabulary of its statement.
Parameters
$option | Node | |
$terminology | Terminology |
Returns
Throws
ImplementationGap When a production has no ruleCalled from 3
- method-call SqlSemantics\Platform\MySql\Lowering\Replication\ChangeRule::statement() packages/sql-semantics-mysql/src/Lowering/Replication/ChangeRule.php:96
- method-call SqlSemantics\Platform\MySql\Lowering\Replication\UntilRule::conditions() packages/sql-semantics-mysql/src/Lowering/Replication/UntilRule.php:83
- method-call SqlSemantics\Platform\MySql\Lowering\Replication\UntilRule::conditions() packages/sql-semantics-mysql/src/Lowering/Replication/UntilRule.php:87
Calls 9
- method-call Lowering::form() line 209
- class-const SourceOptionRule::FORWARD() line 210
- function-call
array_key_existsline 213 - class-const SourceOptionRule::OPTIONS() line 213
- static-call ImplementationGap::production() line 214
- method-call SourceOptionRule::keyword() line 216
- new SourceOption line 218
- method-call SourceValueRule::value() line 218
- new SourceValueRule line 218
public function keyword(Node $keyword): SourceOptionKindAnswers the option an option keyword rule names.
Parameters
$keyword | Node |
Returns
Throws
ImplementationGap When the production has no ruleCalled from 1
Calls 3
- method-call Lowering::form() line 228
- class-const SourceOptionRule::KEYWORDS() line 230
- static-call ImplementationGap::production() line 230
Private surface 4§
Implementation details, listed for orientation only.
private const KEYWORDS = ['change_replication_source_auto_position: MASTER_AUTO_POSITION_SYM' => \SqlSem…private const OPTIONS = ['master_def: IGNORE_SERVER_IDS_SYM EQ ( ignore_server_id_list )' => \SqlSemant…private const FORWARD = ['master_def: master_file_def' => true, 'source_def: source_file_def' => true]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
SourceOptionRuleTestcalls
Relations§
Instantiated in 2
Method calls 3
- method-call SqlSemantics\Platform\MySql\Lowering\Replication\ChangeRule::statement() packages/sql-semantics-mysql/src/Lowering/Replication/ChangeRule.php:96
- method-call SqlSemantics\Platform\MySql\Lowering\Replication\UntilRule::conditions() packages/sql-semantics-mysql/src/Lowering/Replication/UntilRule.php:83
- method-call SqlSemantics\Platform\MySql\Lowering\Replication\UntilRule::conditions() packages/sql-semantics-mysql/src/Lowering/Replication/UntilRule.php:87