interface RoleOption
    extends Node
Public API: explicitly declared with @visibility public.

One option of CREATE ROLE or ALTER ROLE.

Mirrors the DefElem the grammar builds for CreateOptRoleElem and AlterOptRoleElem. Several spellings fill the same option of the server (LOGIN and NOLOGIN both fill canlogin), and an option filled twice is rejected, so every option tells which one it fills. Source: https://www.postgresql.org/docs/17/sql-createrole.html.

Telling which option of the server a spelling fillsdoctest
$operation = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('CREATE ROLE joe NOLOGIN');
    $operation->statement->options[0]->option() // => 'canlogin'

Methods§

public function option(): ?string

Answers the option of the server this spelling fills, or null when the server keeps none for it.

Returns

?string

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§

Implemented by 7
Constant reads 2
Type declarations 1