interface ParameterDeclarations
    extends Relation
Public API: explicitly declared with @visibility public.

A list that declares the types of the positional parameters of the statements it encloses.

The parameter list of a routine with an SQL-standard body and the type list of PREPARE give $1, $2 and so on their types. The list is a relation whose row holds one slot per parameter in order: $n denotes slot n of the nearest such list visible from its position. Source: https://www.postgresql.org/docs/17/xfunc-sql.html#XFUNC-SQL-FUNCTION-ARGUMENTS, https://www.postgresql.org/docs/17/sql-prepare.html.

Typing a parameter of a prepared statement from its declared typedoctest
$prepare = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('PREPARE p (integer) AS SELECT $1');
    $prepare->statement->parameters?->infersUndeclared() // => true

Methods§

public function infersUndeclared(): bool

Tells whether a parameter beyond the declared ones is inferred from its use, as in PREPARE, instead of being an error, as in a routine body.

Returns

bool

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§

Implemented by 2
Type checks 1