final class SourceOption
    implements Node
    uses Snapshot
Public API: explicitly declared with @visibility public.

One option = value of CHANGE REPLICATION SOURCE TO, or one log position of the UNTIL condition of START REPLICA.

Mirrors one field of the server's LEX_SOURCE_INFO. The value is typed by the option (SourceOptionKind::accepts); NULL is the value null, accepted by PRIVILEGE_CHECKS_USER and SOURCE_TLS_CIPHERSUITES. The option is written in the vocabulary of its statement. Source: https://dev.mysql.com/doc/refman/8.4/en/change-replication-source-to.html.

Holding a typed option valuedoctest
$option = new \SqlSemantics\Platform\MySql\Statement\Replication\Source\SourceOption(\SqlSemantics\Platform\MySql\Statement\Replication\Terminology::Current, \SqlSemantics\Platform\MySql\Statement\Replication\Source\SourceOptionKind::Port, new \SqlSemantics\Platform\MySql\Statement\Literal\Numeral('3306'));
    $option->kind->value // => 'SOURCE_PORT'

Properties§

public Terminology $terminology

Methods§

public function __construct(
    public Terminology $terminology,
    public SourceOptionKind $kind,
    public Text|Numeral|NumberLiteral|ServerIds|AccountName|PrimaryKeyCheck|AnonymousGtids|null $value,
)

Parameters

$terminologyTerminologyThe vocabulary of the statement the option belongs to
$kindSourceOptionKindThe option
$valueText|Numeral|NumberLiteral|ServerIds|AccountName|PrimaryKeyCheck|AnonymousGtids|nullThe value, of the domain of the option
Calls 2
public function render(Output $out): void

Writes the option, = and the value.

Parameters

$outOutput
Calls 3

Test cases 7§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 1
Other tests reaching this symbol 6

Relations§

Instantiated in 1
Constant reads 2
Type declarations 3