interfaceRoleOption
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.
$operation = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('CREATE ROLE joe NOLOGIN');
$operation->statement->options[0]->option() // => 'canlogin'Methods§
public function option(): ?stringAnswers the option of the server this spelling fills, or null when the server keeps none for it.
Returns
?stringTest 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
- RoleAttribute packages/sql-semantics-postgres/src/Statement/Catalog/Access/Role/RoleAttribute.php:27
- RoleConnectionLimit packages/sql-semantics-postgres/src/Statement/Catalog/Access/Role/RoleConnectionLimit.php:25
- RoleInherit packages/sql-semantics-postgres/src/Statement/Catalog/Access/Role/RoleInherit.php:22
- RoleMembers packages/sql-semantics-postgres/src/Statement/Catalog/Access/Role/RoleMembers.php:22
- RolePassword packages/sql-semantics-postgres/src/Statement/Catalog/Access/Role/RolePassword.php:25
- RoleSystemId packages/sql-semantics-postgres/src/Statement/Catalog/Access/Role/RoleSystemId.php:22
- RoleValidity packages/sql-semantics-postgres/src/Statement/Catalog/Access/Role/RoleValidity.php:23
Constant reads 2
- class-const SqlSemantics\Platform\PostgreSql\Statement\Catalog\Access\Role\AlterRole::__construct() packages/sql-semantics-postgres/src/Statement/Catalog/Access/Role/AlterRole.php:50
- class-const SqlSemantics\Platform\PostgreSql\Statement\Catalog\Access\Role\CreateRole::__construct() packages/sql-semantics-postgres/src/Statement/Catalog/Access/Role/CreateRole.php:51