Namespace LinqToDB.Internal.Expressions
Classes
- ExpressionEqualityComparer
This API supports the linq2db infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.
- ExpressionInstances
Contains pre-created instances of ConstantExpression object for often used constants. Using those instances we avoid unnecessary allocations of same constant instances and avoid boxing for value constants (e.g. booleans, integers).
- ExpressionPrinter
A class to create a printable string representation of expression.
- SqlAggregateLifterExpression
Wraps a SqlPlaceholderExpression produced by an aggregate-function translator and carries up to two delegates that customize how the placeholder is processed at later phases of query building:
- MaterializationCheck — invoked at C# materialization
time. Used by non-nullable Min/Max/Avg to wrap the column read with a runtime
CheckNullValuecall that throws on NULL. - SqlRewriter — invoked at OUTER APPLY lift time
(in
AggregateExecuteContext.CreateWeakOuterJoin) afterUpdateNestinghas promoted the inner aggregate to a parent-side column reference, or eagerly for grouped aggregates. Used by non-nullable Sum and StringJoin-family aggregates to wrap the lifted column reference withCOALESCE(<ref>, default). The bare aggregate stays in the inner SQL tree during provider validation/ optimization.
At least one of the two delegates is set. Both can be set when an aggregate needs runtime null-check AND late SQL coalesce wrapping; in that case, the conceptual order is:
SqlRewriterruns at lift time, thenMaterializationCheckat materialization. CanReduce returns false — neither delegate is auto-invoked by visitor reduction; consumers explicitly invoke them at the right hook point.- MaterializationCheck — invoked at C# materialization
time. Used by non-nullable Min/Max/Avg to wrap the column read with a runtime
Structs
- WindowFunctionHelpers.WindowFrameSpec
Describes a converted window frame:
ROWS/RANGEplus its start and end boundaries.StartMember/EndMemberare the WindowFunctionBuilder.IBoundaryPart<TBoundaryDefined> member names —"Unbounded","CurrentRow","ValuePreceding", or"ValueFollowing"; the matching value is the offset expression for theValue*members and null otherwise.
Enums
- SqlGenericConstructorExpression.CreateType
Defines instance creation approach/method.