final class PositionOutOfRange
    implements Diagnostic
    uses Snapshot
Public API: explicitly declared with @visibility public.

An output column position that the select list does not have.

Reporting a position past the select listdoctest
(new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('SELECT 1 ORDER BY 2') // throws \SqlSemantics\Platform\PostgreSql\Model\Diagnostic\SemanticException: ORDER BY position 2 is not in select list

Properties§

public OrderingClause $clause
public string $position

Methods§

public function __construct(public OrderingClause $clause, public string $position)

Parameters

$clauseOrderingClauseThe clause the position is written in
$positionstringThe position as an exact decimal integer
public function message(): string

Describes the problem in the words of PostgreSQL.

Returns

string

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