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

A select list position in ORDER BY or GROUP BY beyond the select list.

Reading a position outside the select listdoctest
(new \SqlSemantics\Platform\MySql\Semantics())->analyze('SELECT 1 ORDER BY 3') // throws \SqlSemantics\Platform\MySql\Model\Diagnostic\SemanticException: Unknown column '3' in 'order clause': the select list has 1 items.

Properties§

public int $position
public int $items

Methods§

public function __construct(public int $position, public int $items)

Parameters

$positionintThe position written, counting from one
$itemsintThe number of select list items
public function message(): string

Describes the position in the words of the server.

Returns

string
Test cases 1

Test cases 2§

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

Dedicated tests 1
Other tests reaching this symbol 1

Relations§

Instantiated in 1