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

Derives a condition of a definition: a CHECK constraint, a partial index predicate, a trigger or rule WHEN, a policy expression.

Rule: PG-TABLE-CONDITION-001. The condition is derived in the environment the definition gives. Its value is coerced to boolean: a condition of a known type other than boolean (an untyped string constant becomes boolean) is reported as "argument of CHECK must be type boolean". A condition of a type that is not known is not reported. Source: https://www.postgresql.org/docs/17/typeconv-query.html, https://www.postgresql.org/docs/17/sql-createtable.html. Status: Implemented.

Methods§

public function derive(
    Derivation $derivation,
    Scalar $condition,
    Environment $environment,
    string $clause,
): ScalarFact

Derives the condition and reports a known type that is not boolean.

Parameters

$derivationDerivation
$conditionScalar
$environmentEnvironment
$clausestringThe clause the server names in its message, such as CHECK or WHERE

Returns

Called from 8
Calls 7

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 8
Method calls 8