Table of Contents

Interface INullSafeComparisonRenderer

Namespace
NextORM.Core
Assembly
nextorm.core.dll

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

NullSafeComparisonDisposition

NotDistinctDisposition

How the is not distinct from form is expressed; the default rejects it.

NullSafeComparisonDisposition NotDistinctDisposition { get; }

Property Value

NullSafeComparisonDisposition

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

bool

SupportsDistinct

True when DistinctDisposition is not Unsupported.

bool SupportsDistinct { get; }

Property Value

bool

SupportsNotDistinct

bool SupportsNotDistinct { get; }

Property Value

bool

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

left string

The already-rendered left operand.

right string

The already-rendered right operand.

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

left string

The already-rendered left operand.

right string

The already-rendered right operand.

Returns

string

The two-valued predicate.