final class Limits
Restricted visibility: declared "@visibility SqlSemantics\Platform\PostgreSql". Code outside that scope must not name this declaration.

Derives the LIMIT, OFFSET and FETCH clauses and checks the locking clauses of a query.

Rule: PG-LIMIT-001. The count and the offset are evaluated once and see no column of their own query, only the enclosing queries. LIMIT with a comma is reported. WITH TIES without ORDER BY, and WITH TIES together with SKIP LOCKED, are reported. A locking clause names FROM items of its query, unqualified, by alias or table name; a name no FROM item has is reported. Terminates: one pass over the clauses. Source: https://www.postgresql.org/docs/17/sql-select.html#SQL-LIMIT, https://www.postgresql.org/docs/17/sql-select.html#SQL-FOR-UPDATE-SHARE. Status: Implemented.

Methods§

public function locked(
    list<LockingClause> $clauses,
    list<VisibleRelation> $visible,
    Derivation $derivation,
): void

Reports the relations of locking clauses that are qualified or that no FROM item of the query has.

Parameters

$clauseslist<LockingClause>
$visiblelist<VisibleRelation>The relations of the FROM items of the query
$derivationDerivation
Called from 1
Calls 8

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§

Instantiated in 3
Method calls 5