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

The REQUIRE clause of CREATE USER, ALTER USER or MySQL 5.x GRANT: REQUIRE NONE | SSL | X509 | condition [AND] ….

The conditions are kept in source order; AND between them is optional and means nothing. A property named twice is rejected by the server (ER_DUP_ARGUMENT), which the statement reports. Source: https://dev.mysql.com/doc/refman/8.4/en/create-user.html#create-user-tls.

Reading the conditions of a requirementdoctest
$tls = (new \SqlSemantics\Platform\MySql\Semantics())->analyze("CREATE USER u REQUIRE SUBJECT 's' ISSUER 'i'")->statement->tls;
    [$tls?->kind, count($tls?->conditions ?? [])] // => [\SqlSemantics\Platform\MySql\Statement\Account\Option\TlsKind::Specified, 2]

Properties§

public list<TlsCondition> $conditions
public TlsKind $kind

Methods§

public function __construct(public TlsKind $kind, list<TlsCondition> $conditions = [])

Parameters

$kindTlsKindWhat is required
$conditionslist<TlsCondition>The conditions of a specified requirement, in order; none otherwise
Calls 4
public function render(Output $out): void

Writes the clause.

Parameters

$outOutput
Calls 6

Test cases 1§

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

Dedicated tests 1

Relations§

Instantiated in 4
Type declarations 5