classRoleConnectionLimit
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.
$operation = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('CREATE ROLE joe CONNECTION LIMIT 5');
$operation->statement->options[0]->magnitude->digits // => '5'Properties§
public IntegerConstant $magnitudeThe magnitude of the limit.
public SignedNumber $limitMethods§
public function __construct(public SignedNumber $limit)Parameters
$limit | SignedNumber | The limit, a signed integer |
Calls 1
- static-call Check::input() line 40
public function option(): stringAnswers the option a connection limit fills.
Returns
stringTest cases 1
public function acceptable(): boolTells whether the server accepts the limit: -1 or more.
Returns
boolTest cases 1
public function render(Output $out): voidTest cases 4§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.