final class BooleanTest
    implements Scalar
    uses Snapshot
Public API: explicitly declared with @visibility public.

A truth-value test: a IS [NOT] TRUE, FALSE or UNKNOWN.

Mirrors PostgreSQL's BooleanTest node.

Rule: PG-BOOLEAN-TEST-001. Facts: boolean, never NULL; an operand that is not boolean is reported. The operand must keep its place before IS (PG-PRECEDENCE-001). Source: https://www.postgresql.org/docs/17/functions-comparison.html. Status: Implemented.

A truth-value test is never NULLdoctest
(new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('SELECT NULL IS TRUE')->field(0)->nullability // => \SqlSemantics\Platform\PostgreSql\Model\Statement\Type\Nullability::NotNull

Properties§

public Scalar $operand

Methods§

public function __construct(public Scalar $operand, public BooleanTestKind $kind)

Parameters

$operandScalarThe tested condition
$kindBooleanTestKindThe test
Calls 4
public function deriveScalar(Derivation $derivation, Environment $environment): ScalarFact

Derives the operand and checks that it is boolean.

Parameters

$derivationDerivation
$environmentEnvironment

Returns

Calls 7
public function render(Output $out): void

Writes the value and the test.

Parameters

$outOutput
Test cases 1
Calls 2

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 1
Type checks 1