final class Expression
Public API: explicitly declared with @visibility public.

A typed expression with original syntax, occurrence-aware lineage, and NULL provenance.

Accept this semantic value in a database-independent consumerdoctest
$consume = static fn (\SqlSemantics\Core\Model\Expression $value): string => $value::class;
    $consume instanceof \Closure // => true

Properties§

public Nullability $nullability
public Node|Token $source
public list<Expression> $operands = []
public ColumnBinding|null $binding = null
public string|null $symbol = null
public list<string> $nullExtendedBy = []

Methods§

public function __construct(
    public ExpressionKind $kind,
    public TypeDescriptor $type,
    public Nullability $nullability,
    public Node|Token $source,
    public list<Expression> $operands = [],
    public ColumnBinding|null $binding = null,
    public string|null $symbol = null,
    public list<string> $nullExtendedBy = [],
)

Parameters

$kindExpressionKindSemantic operation
$typeTypeDescriptorResult type
$nullabilityNullabilityConservative NULL fact at this evaluation stage
$sourceNode|TokenOriginal syntax object, never a reparsed copy
$operandslist<Expression>Ordered inputs to the operation
$bindingColumnBinding|nullResolved declaration for a column reference
$symbolstring|nullOperator, parameter name, or literal spelling
$nullExtendedBylist<string>Join IDs that can introduce NULL into this result
public function lineage(): list<ColumnBinding>

Collects value dependencies without collapsing separate uses of the same table.

Returns

list<ColumnBinding> Unique relation-and-column bindings in encounter order
Calls 2

Test cases 68§

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

Dedicated tests 1
Other tests reaching this symbol 67

Relations§

Instantiated in 7
Type declarations 26