Class TranslationProviderFlags
- Namespace
- LinqToDB.Linq.Translation
- Assembly
- linq2db.dll
Read-only, translation-relevant subset of the provider's SqlProviderFlags, exposed to member
translators via ProviderFlags. Only the flags member translators need
are surfaced here, rather than the whole SqlProviderFlags.
public sealed class TranslationProviderFlags
- Inheritance
-
objectTranslationProviderFlags
- Extension Methods
Constructors
TranslationProviderFlags(NullsDefaultOrdering, bool)
Initializes a new TranslationProviderFlags.
public TranslationProviderFlags(NullsDefaultOrdering defaultNullsOrdering, bool isNullsOrderingSupported)
Parameters
defaultNullsOrderingNullsDefaultOrderingThe provider's natural NULL placement when no
NULLS FIRST/NULLS LASTis specified.isNullsOrderingSupportedboolWhether the provider supports the
NULLS FIRST/NULLS LASTkeyword inORDER BY.
TranslationProviderFlags(NullsDefaultOrdering, bool, bool, bool, bool, SqlIntervalUnit, bool)
Initializes a new TranslationProviderFlags.
public TranslationProviderFlags(NullsDefaultOrdering defaultNullsOrdering, bool isNullsOrderingSupported, bool canLowerIntervalDifference, bool canLowerIntervalPart, bool canLowerIntervalShift, SqlIntervalUnit intervalResolution = SqlIntervalUnit.Tick, bool canMeasureDifferenceInTicks = true)
Parameters
defaultNullsOrderingNullsDefaultOrderingThe provider's natural NULL placement when no
NULLS FIRST/NULLS LASTis specified.isNullsOrderingSupportedboolWhether the provider supports the
NULLS FIRST/NULLS LASTkeyword inORDER BY.canLowerIntervalDifferenceboolWhether an elapsed date difference can be lowered to a value.
canLowerIntervalPartboolWhether a member of an elapsed date difference can be lowered.
canLowerIntervalShiftboolWhether a date shifted by an interval can be lowered.
intervalResolutionSqlIntervalUnitThe finest unit the provider can resolve when measuring elapsed time.
canMeasureDifferenceInTicksboolWhether an elapsed date difference can become a tick count.
Properties
CanLowerIntervalDifference
Whether an elapsed date difference can be lowered to a value. Answered by the provider's
SqlExpressionConvertVisitor, which owns the lowering and documents the contract.
public bool CanLowerIntervalDifference { get; }
Property Value
CanLowerIntervalPart
Whether a member of an elapsed date difference can be lowered. Separate from CanLowerIntervalDifference because a provider may have only this half.
public bool CanLowerIntervalPart { get; }
Property Value
CanLowerIntervalShift
Whether a date shifted by an interval can be lowered. Read for a shift by a declared duration only: that amount is real and nothing later removes it, so a provider that cannot spend one says so while the expression is still being built and leaves a projection free to fall back to .NET. A shift by a computed difference is built regardless, because it may cancel against the difference it came from and ask the provider for nothing at all.
public bool CanLowerIntervalShift { get; }
Property Value
CanMeasureDifferenceInTicks
Whether an elapsed date difference can become a tick count. Where it cannot, a total asked for in a unit finer than IntervalResolution has nowhere to come from, so the translator declines to build it and leaves the member to .NET rather than letting the SQL builder fail the whole query. A total is otherwise built: a coarser measurement quantises one without making it meaningless.
public bool CanMeasureDifferenceInTicks { get; }
Property Value
DefaultNullsOrdering
The provider's natural NULL placement when no NULLS FIRST/NULLS LAST is specified.
public NullsDefaultOrdering DefaultNullsOrdering { get; }
Property Value
IntervalResolution
The finest unit the provider can resolve when measuring elapsed time. A component asked for in a finer unit is identically zero rather than merely imprecise, so the translator declines to build it and leaves the member to .NET.
public SqlIntervalUnit IntervalResolution { get; }
Property Value
IsNullsOrderingSupported
Whether the provider supports the NULLS FIRST/NULLS LAST keyword in ORDER BY.
public bool IsNullsOrderingSupported { get; }