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

The role option CONNECTION LIMIT: how many concurrent connections the role can make.

The limit is a signed integer; -1 means no limit, and a smaller number is rejected by the server, which the statement reports. Source: https://www.postgresql.org/docs/17/sql-createrole.html.

Reading the limitdoctest
$operation = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('CREATE ROLE joe CONNECTION LIMIT 5');
    $operation->statement->options[0]->magnitude->digits // => '5'

Properties§

public IntegerConstant $magnitude

The magnitude of the limit.

public SignedNumber $limit

Methods§

public function __construct(public SignedNumber $limit)

Parameters

$limitSignedNumberThe limit, a signed integer
Calls 1
public function option(): string

Answers the option a connection limit fills.

Returns

string
Test cases 1
public function acceptable(): bool

Tells whether the server accepts the limit: -1 or more.

Returns

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

Writes the option.

Parameters

$outOutput
Calls 1

Test cases 4§

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

Dedicated tests 3
Other tests reaching this symbol 1

Relations§

Instantiated in 1
Type checks 1