classExpression
final class Expression
Public API: explicitly declared with
@visibility public.A typed expression with original syntax, occurrence-aware lineage, and NULL provenance.
$consume = static fn (\SqlSemantics\Core\Model\Expression $value): string => $value::class;
$consume instanceof \Closure // => trueProperties§
public ExpressionKind $kindpublic TypeDescriptor $typepublic Nullability $nullabilitypublic list<Expression> $operands = []public ColumnBinding|null $binding = nullpublic string|null $symbol = nullpublic 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
$kind | ExpressionKind | Semantic operation |
$type | TypeDescriptor | Result type |
$nullability | Nullability | Conservative NULL fact at this evaluation stage |
$source | Node|Token | Original syntax object, never a reparsed copy |
$operands | list<Expression> | Ordered inputs to the operation |
$binding | ColumnBinding|null | Resolved declaration for a column reference |
$symbol | string|null | Operator, parameter name, or literal spelling |
$nullExtendedBy | list<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 orderTest cases 68§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
ExpressionTestcalls
Other tests reaching this symbol 67
SchemaAnalyzerTestcallsColumnPropertiesTestcallsColumnReaderTestcallsConstraintReaderTestcallsIdentifiersTestcallsSchemaChangesTestcallsSchemaReaderTestcallsStatementListTestcallsTokenGroupsTestcallsTreeTestcallsTypeReaderTestcallsBinderTestcallsBoundRelationTestcallsExpressionBinderTestcallsExpressionRulesTestcallsFromBinderTestcallsIdentitySequenceTestcallsLiteralBinderTestcallsNullFactsTest::testStrictAndCoalesceFactscallsProjectionBinderTestcallsScopeTestcallsSelectBinderTestcallsSelectModifiersBinderTestcallsSyntaxGuardTestcallsTableResolverTestcallsTypeResolutionTestcallsDialectTestcallsBoundSelectTestcallsColumnBindingTestcallsExpressionKindTestcallsJoinKindTestcallsJoinTestcallsOrderingTestcallsOutputColumnTestcallsTableUseTestcallsPlatformTestcallsNameRulesTestcallsQueryRulesTestcallsSchemaRulesTestcallsSyntaxRulesTestcallsTypeRulesTest::testArithmeticRetainsLanguageSemanticscallsTypeRulesTest::testCoalescePreservesOperandscallsTypeRulesTest::testCommonPreservesHomogeneousTypecallsTypeRulesTest::testPredicateAcceptsBooleanResultscallsTypeRulesTest::testProjectPreservesTypedValuescallsColumnDefinitionTestcallsColumnGenerationTestcallsConstraintKindTestcallsGenerationKindTestcallsInvariantTestcallsTableConstraintTestcallsTableDefinitionTestcallsSchemaBuilderTestcallsSchemaTestcallsSemanticExceptionTestcallsNullabilityTestcallsTypeDescriptorTestcallsSchemaTestcallsNameRulesTestcallsPlatformTestcallsQueryRulesTestcallsSchemaRulesTestcallsTypeRulesTest::testArithmeticRetainsLanguageSemanticscallsTypeRulesTest::testCoalescePreservesOperandscallsTypeRulesTest::testCommonPreservesHomogeneousTypecallsTypeRulesTest::testPredicateAcceptsBooleanResultscallsTypeRulesTest::testProjectPreservesTypedValuescalls
Relations§
Instantiated in 7
- new SqlSemantics\Core\Binding\ExpressionRules::call() packages/sql-semantics/src/Core/Binding/ExpressionRules.php:43
- new SqlSemantics\Core\Binding\ExpressionRules::call() packages/sql-semantics/src/Core/Binding/ExpressionRules.php:51
- new SqlSemantics\Core\Binding\ExpressionRules::coerce() packages/sql-semantics/src/Core/Binding/ExpressionRules.php:66
- new SqlSemantics\Core\Binding\ExpressionRules::operator() packages/sql-semantics/src/Core/Binding/ExpressionRules.php:98
- new SqlSemantics\Core\Binding\LiteralBinder::bind() packages/sql-semantics/src/Core/Binding/LiteralBinder.php:36
- new SqlSemantics\Core\Binding\LiteralBinder::bind() packages/sql-semantics/src/Core/Binding/LiteralBinder.php:43
- new SqlSemantics\Core\Binding\Scope::column() packages/sql-semantics/src/Core/Binding/Scope.php:60
Type declarations 26
- type SqlSemantics\Platform\MySql\TypeRules packages/sql-semantics-mysql/src/TypeRules.php:196
- type SqlSemantics\Platform\MySql\TypeRules packages/sql-semantics-mysql/src/TypeRules.php:212
- type SqlSemantics\Platform\PostgreSql\TypeRules packages/sql-semantics-postgres/src/TypeRules.php:208
- type SqlSemantics\Platform\PostgreSql\TypeRules::coalesce() packages/sql-semantics-postgres/src/TypeRules.php:221
- type SqlSemantics\Platform\PostgreSql\TypeRules packages/sql-semantics-postgres/src/TypeRules.php:227
- type SqlSemantics\Platform\Sqlite\TypeRules packages/sql-semantics-sqlite/src/TypeRules.php:182
- type SqlSemantics\Platform\Sqlite\TypeRules packages/sql-semantics-sqlite/src/TypeRules.php:198
- type SqlSemantics\Core\Binding\ExpressionBinder packages/sql-semantics/src/Core/Binding/ExpressionBinder.php:22
- type SqlSemantics\Core\Binding\ExpressionBinder packages/sql-semantics/src/Core/Binding/ExpressionBinder.php:54
- type SqlSemantics\Core\Binding\ExpressionBinder packages/sql-semantics/src/Core/Binding/ExpressionBinder.php:90
- type SqlSemantics\Core\Binding\ExpressionBinder packages/sql-semantics/src/Core/Binding/ExpressionBinder.php:111
- type SqlSemantics\Core\Binding\ExpressionRules packages/sql-semantics/src/Core/Binding/ExpressionRules.php:34
- type SqlSemantics\Core\Binding\ExpressionRules packages/sql-semantics/src/Core/Binding/ExpressionRules.php:60
- type SqlSemantics\Core\Binding\ExpressionRules packages/sql-semantics/src/Core/Binding/ExpressionRules.php:72
- type SqlSemantics\Core\Binding\ExpressionRules packages/sql-semantics/src/Core/Binding/ExpressionRules.php:114
- type SqlSemantics\Core\Binding\LiteralBinder packages/sql-semantics/src/Core/Binding/LiteralBinder.php:31
- type SqlSemantics\Core\Binding\Scope packages/sql-semantics/src/Core/Binding/Scope.php:39
- type SqlSemantics\Core\Binding\SelectModifiersBinder packages/sql-semantics/src/Core/Binding/SelectModifiersBinder.php:48
- type SqlSemantics\Core\Model\BoundSelect packages/sql-semantics/src/Core/Model/BoundSelect.php:37
- type SqlSemantics\Core\Model\BoundSelect packages/sql-semantics/src/Core/Model/BoundSelect.php:40
- type SqlSemantics\Core\Model\BoundSelect packages/sql-semantics/src/Core/Model/BoundSelect.php:41
- type SqlSemantics\Core\Model\Join packages/sql-semantics/src/Core/Model/Join.php:33
- type SqlSemantics\Core\Model\Ordering packages/sql-semantics/src/Core/Model/Ordering.php:24
- type SqlSemantics\Core\Model\OutputColumn packages/sql-semantics/src/Core/Model/OutputColumn.php:26
- type SqlSemantics\Core\Policy\TypeRules packages/sql-semantics/src/Core/Policy/TypeRules.php:66
- type SqlSemantics\Core\Policy\TypeRules packages/sql-semantics/src/Core/Policy/TypeRules.php:77