final class OperandChecks
Restricted visibility: declared "@visibility SqlSemantics". Code outside that scope must not name this declaration.

Checks the operand types that a construct accepts, and combines the NULL facts of operands.

Rule: PG-OPERAND-CHECK-001. A boolean position (AND, OR, NOT, IS TRUE …) accepts boolean and the pseudo-type unknown, which becomes boolean; IS DOCUMENT accepts xml, IS NORMALIZED text, IS JSON text, json, jsonb and bytea, unknown-typed constants included; COLLATE accepts the character string types and arrays of them. Another catalog type is reported and makes the construct invalid; a type that depends on declarations or is invalid is not checked here. A strict construct can be NULL when an operand can; NULL itself can. Termination: constant work per operand. Source: https://www.postgresql.org/docs/17/functions-logical.html, https://www.postgresql.org/docs/17/functions-xml.html#FUNCTIONS-XML-PREDICATES, https://www.postgresql.org/docs/17/functions-json.html#FUNCTIONS-SQLJSON-MISC, https://www.postgresql.org/docs/17/collation.html. Status: Implemented.

Methods§

public function collatable(Derivation $derivation, TypeFact $type): TypeFact

Checks that the type of a collated value has collations; answers the type, or the invalid fact of a mismatch.

Parameters

$derivationDerivation
$typeTypeFact

Returns

Test cases 1
Called from 1
Calls 8
public function nullability(list<ScalarFact> $operands): Nullability

Combines the NULL facts of the operands of a strict construct.

Parameters

$operandslist<ScalarFact>
Test cases 1
Called from 13
Calls 2
public function fields(list<ScalarFact> $operands): Nullability

Combines the NULL facts of the fields of rows, or of the values themselves when they are not rows.

Parameters

$operandslist<ScalarFact>
Test cases 1
Called from 1
Calls 2

Test cases 5§

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

Dedicated tests 5

Relations§

Instantiated in 15
Method calls 21