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

A NULL test: IS [NOT] NULL (Item_func_isnull, Item_func_isnotnull).

The test belongs to the bool_pri level, like the comparisons, and associates to the left with them.

Rule: MYSQL-NULL-TEST-001. Facts: always 1 or 0, an integer that is never NULL. A row operand is accepted (a row is NULL when every element is). Terminates: the operand is a strict part. Source: https://dev.mysql.com/doc/refman/8.4/en/comparison-operators.html#operator_is-null. Status: Implemented.

Testing a column for NULLdoctest
$query = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('SELECT a FROM t WHERE a IS NOT NULL');
    $query->statement->where->negated // => true

Properties§

public Scalar $operand
public bool $negated = false

Methods§

public function __construct(public Scalar $operand, public bool $negated = false)

Parameters

$operandScalarThe tested expression
$negatedboolWhether NOT is written after IS
Calls 4
public function deriveScalar(Derivation $derivation, Environment $environment): ScalarFact

Derives the operand; the test is never NULL.

Parameters

$derivationDerivation
$environmentEnvironment

Returns

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

Writes the operand, IS, the optional NOT and NULL.

Parameters

$outOutput
Test cases 1
Calls 2

Test cases 4§

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

Dedicated tests 3
Other tests reaching this symbol 1

Relations§

Instantiated in 2
Type checks 1
Type declarations 1