Interface INullSafeComparisonRenderer
A dialect's renderer for the explicit null-safe comparison helpers (is_distinct_from<T>(T, T) and is_not_distinct_from<T>(T, T)). Each form carries its own disposition, so a provider can support one form and reject the other, and every disposition other than Unsupported has its rendering on the same object.
public interface INullSafeComparisonRenderer
- Extension Methods
Remarks
The capability is absent by default: NullSafeComparison returns null for a provider that has not opted in, and the translator then rejects the helper with an exception naming the provider and the form instead of emitting SQL the provider cannot execute. Both renderings return a two-valued predicate; the caller lowers it to a scalar value through MakeBooleanPredicate(string, bool).
Properties
DistinctDisposition
How the is distinct from form is expressed; the default rejects it.
NullSafeComparisonDisposition DistinctDisposition { get; }
Property Value
NotDistinctDisposition
How the is not distinct from form is expressed; the default rejects it.
NullSafeComparisonDisposition NotDistinctDisposition { get; }
Property Value
RequiresTypedNullOperands
True when the provider cannot bind a captured comparison operand without an explicit SQL type, so every captured operand of the helper must resolve one from the compared column's metadata (converter/provider mapping first) or from the CLR-type mapping. When neither yields a mapping the helper is rejected before execution instead of emitting an untyped comparison operand. SQL Server opts in; the default is false, which keeps the provider's value-based parameter inference.
bool RequiresTypedNullOperands { get; }
Property Value
SupportsDistinct
True when DistinctDisposition is not Unsupported.
bool SupportsDistinct { get; }
Property Value
SupportsNotDistinct
True when NotDistinctDisposition is not Unsupported.
bool SupportsNotDistinct { get; }
Property Value
Methods
RenderDistinct(string, string)
Renders left is distinct from right over the already-rendered operands. Reached only
when SupportsDistinct is true.
string RenderDistinct(string left, string right)
Parameters
Returns
- string
The two-valued predicate.
RenderNotDistinct(string, string)
Renders left is not distinct from right over the already-rendered operands. Reached only
when SupportsNotDistinct is true.
string RenderNotDistinct(string left, string right)
Parameters
Returns
- string
The two-valued predicate.