final class RoleValidity
    implements RoleOption
    uses Snapshot
Public API: explicitly declared with @visibility public.

The role option VALID UNTIL: the time after which the password of the role is no longer valid.

The time is written as a string that the server reads as a timestamp with the settings of the session when the statement runs. Source: https://www.postgresql.org/docs/17/sql-createrole.html.

Reading the timedoctest
$operation = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze("CREATE ROLE joe VALID UNTIL 'infinity'");
    $operation->statement->options[0]->until->value // => 'infinity'

Properties§

Methods§

public function __construct(public StringConstant $until)

Parameters

$untilStringConstantThe time as written
public function option(): string

Answers the option the time fills.

Returns

string
Test cases 1
public function render(Output $out): void

Writes the option.

Parameters

$outOutput
Calls 1

Test cases 2§

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 1

Relations§

Instantiated in 1