final class CommaLimit
    implements Node
    uses Snapshot
Public API: explicitly declared with @visibility public.

LIMIT count, offset: a spelling the grammar accepts and PostgreSQL rejects.

The server asks for separate LIMIT and OFFSET clauses instead; the structure keeps both operands and the query reports the problem. Source: https://www.postgresql.org/docs/17/sql-select.html#SQL-LIMIT.

Reporting LIMIT with a commadoctest
(new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('SELECT 1 LIMIT 1, 2') // throws \SqlSemantics\Platform\PostgreSql\Model\Diagnostic\SemanticException: LIMIT #,# syntax is not supported

Properties§

public Scalar|null $count
public Scalar $offset

Methods§

public function __construct(public Scalar|null $count, public Scalar $offset)

Parameters

$countScalar|nullThe row count; null for ALL
$offsetScalarThe number of rows to skip
public function render(Output $out): void

Writes LIMIT, the count or ALL, a comma and the offset.

Parameters

$outOutput
Calls 3

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 1
Type checks 3
Type declarations 2