enum RoleFlag: string
Public API: explicitly declared with @visibility public.

The role attributes written as a plain word, such as SUPERUSER or NOLOGIN.

The grammar reads these words as identifiers and compares them with this fixed list; the value of a case is the word as the server compares it. INHERIT is not in the list: it is a keyword with a production of its own. Source: https://www.postgresql.org/docs/17/sql-createrole.html.

Reading the option a word fills and whether it turns the attribute ondoctest
$flag = \SqlSemantics\Platform\PostgreSql\Statement\Catalog\Access\Role\RoleFlag::NoLogin;
    [$flag->option(), $flag->enabled()] // => ['canlogin', false]

Cases§

case Superuser = 'superuser'
case NoSuperuser = 'nosuperuser'
case CreateRole = 'createrole'
case NoCreateRole = 'nocreaterole'
case Replication = 'replication'
case NoReplication = 'noreplication'
case CreateDb = 'createdb'
case NoCreateDb = 'nocreatedb'
case Login = 'login'
case NoLogin = 'nologin'
case BypassRls = 'bypassrls'
case NoBypassRls = 'nobypassrls'
case NoInherit = 'noinherit'

Methods§

public function option(): string
public function enabled(): bool

Tells whether the word turns the attribute on.

Returns

bool
Calls 1
  • function-call str_starts_with line 57

Test cases 3§

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

Dedicated tests 2
Other tests reaching this symbol 1

Relations§

Static calls 1
Type declarations 1