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

Tells which ORDER BY, GROUP BY and DISTINCT ON terms PostgreSQL reads as output column positions.

Rule: PG-OUTPUT-POSITION-001. PostgreSQL decides this from the parse tree before resolving anything. A term that is a plain constant is a position when it is an integer of type integer and an error otherwise; parentheses around the constant are not kept by the server, and a minus sign written before it is folded into it. Every other term is an expression. Source: https://www.postgresql.org/docs/17/sql-select.html#SQL-ORDERBY, https://www.postgresql.org/docs/17/sql-syntax-lexical.html#SQL-SYNTAX-CONSTANTS-NUMERIC. Status: Implemented.

Methods§

public function value(Scalar $term): ?string

Answers the position a term denotes as an exact decimal integer, or null when the term is not an integer constant.

Parameters

$termScalar

Returns

?string
Test cases 1
Called from 9
Calls 2
public function misused(Scalar $term): bool

Test cases 3§

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

Dedicated tests 3

Relations§

Instantiated in 10
Method calls 10