Class SqlProviderFlags
- Namespace
- LinqToDB.Internal.SqlProvider
- Assembly
- linq2db.dll
[DataContract]
public sealed class SqlProviderFlags
- Inheritance
-
SqlProviderFlags
- Inherited Members
- Extension Methods
Constructors
SqlProviderFlags()
public SqlProviderFlags()
Properties
AcceptsOuterExpressionInAggregate
Provider supports aggregated expression with Outer reference
SELECT
(
SELECT SUM(inner.FieldX + outer.FieldOuter)
FROM table2 inner
) AS Sum_Column
FROM table1 outer
Otherwise aggeragated expression will be wrapped in subquery and aggregate function will be applied to subquery column.
SELECT
(
SELECT
SUM(sub.Column)
FROM
(
SELECT inner.FieldX + outer.FieldOuter AS Column
FROM table2 inner
) sub
) AS Sum_Column
FROM table1 outer
Default (set by DataProviderBase): true.
[DataMember(Order = 33)]
public bool AcceptsOuterExpressionInAggregate { get; set; }
Property Value
AcceptsTakeAsParameter
Indicates that TAKE/TOP/LIMIT could accept parameter.
Default (set by DataProviderBase): true.
[DataMember(Order = 3)]
public bool AcceptsTakeAsParameter { get; set; }
Property Value
AcceptsTakeAsParameterIfSkip
Indicates that TAKE/LIMIT could accept parameter only if also SKIP/OFFSET specified.
Default (set by DataProviderBase): false.
[DataMember(Order = 4)]
public bool AcceptsTakeAsParameterIfSkip { get; set; }
Property Value
CalculateSupportedCorrelatedLevelWithAggregateQueries
Gets or sets a value indicating whether the calculation of deep level includes aggregation queries. Works in conjunction with SupportedCorrelatedSubqueriesLevel.
[DataMember(Order = 57)]
public bool CalculateSupportedCorrelatedLevelWithAggregateQueries { get; set; }
Property Value
CanCombineParameters
Indicates that provider could share parameter between statements in multi-statement batch.
Default (set by DataProviderBase): true.
[DataMember(Order = 22)]
public bool CanCombineParameters { get; set; }
Property Value
CustomFlags
Flags for use by external providers.
[DataMember(Order = 1)]
public HashSet<string> CustomFlags { get; set; }
Property Value
DefaultMultiQueryIsolationLevel
Used when there is query which needs several additional database requests for completing query (e.g. eager load or client-side GroupBy). Default (set by DataProviderBase): RepeatableRead.
[DataMember(Order = 37)]
public IsolationLevel DefaultMultiQueryIsolationLevel { get; set; }
Property Value
DoesProviderTreatsEmptyStringAsNull
Provider treats empty string as null in queries.
It is specific behaviour only for Oracle.
Default false
[DataMember(Order = 30)]
public bool DoesProviderTreatsEmptyStringAsNull { get; set; }
Property Value
IsAccessBuggyLeftJoinConstantNullability
Indicates that provider has bug in LEFT join translator. In the following example can_be_null is always not null, which is wrong.
SELECT
can_be_null
FROM Some
LEFT JOIN 1 as can_be_null, * FROM Other
ON ...
As workaround translator is trying to check for nullability all projected fields.
Default value: false.
[DataMember(Order = 48)]
public bool IsAccessBuggyLeftJoinConstantNullability { get; set; }
Property Value
IsAllSetOperationsSupported
Provider supports EXCEPT ALL, INTERSECT ALL set operators. Otherwise they will be emulated.
Default (set by DataProviderBase): false.
[DataMember(Order = 31)]
public bool IsAllSetOperationsSupported { get; set; }
Property Value
IsApplyJoinSupported
Indicates support for OUTER/CROSS APPLY.
Default (set by DataProviderBase): false.
[DataMember(Order = 18)]
public bool IsApplyJoinSupported { get; set; }
Property Value
IsCTESupportsOrdering
Indicates that top level CTE query supports ORDER BY.
Default value: true.
[DataMember(Order = 47)]
public bool IsCTESupportsOrdering { get; set; }
Property Value
IsColumnSubqueryShouldNotContainParentIsNotNull
Workaround over Oracle's bug with subquery in column list which contains parent table column with IS NOT NULL condition.
Default value: false.
[DataMember(Order = 43)]
public bool IsColumnSubqueryShouldNotContainParentIsNotNull { get; set; }
Property Value
Remarks
See Issue3557Case1 test.
IsColumnSubqueryWithParentReferenceAndTakeSupported
Provider supports column subqueries which references outer scope when nesting is more than 1
[DataMember(Order = 42)]
public bool IsColumnSubqueryWithParentReferenceAndTakeSupported { get; set; }
Property Value
Remarks
Used only for Oracle 11. linq2db emulates Take(n) via 'ROWNUM' and it causes additional nesting.
Default value: true.
IsCommonTableExpressionsSupported
Indicates support of CTE expressions.
If provider does not support CTE, unsuported exception will be thrown when using CTE.
Default (set by DataProviderBase): false.
[DataMember(Order = 29)]
public bool IsCommonTableExpressionsSupported { get; set; }
Property Value
IsComplexJoinConditionSupported
When disabled, all conditions from INNER JOIN ON moved to WHERE except conjunction of equality predicates.
FROM T1 INNER JOIN T2 ON t1.field1 == t2.field1 AND t1.field2 == t2.field2 AND t1.field3 > 10
-- with flag:
FROM T1 INNER JOIN T2 ON t1.field1 == t2.field1 AND t1.field2 == t2.field2
WHERE t1.field3 > 10
Default: true.
[DataMember(Order = 60)]
public bool IsComplexJoinConditionSupported { get; set; }
Property Value
IsCorrelatedSubQueryTakeSupported
Indicates support for paging clause in correlated subquery.
Default (set by DataProviderBase): true.
[DataMember(Order = 11)]
public bool IsCorrelatedSubQueryTakeSupported { get; set; }
Property Value
IsCountSubQuerySupported
Indicates that database supports count subquery as scalar in column.
SELECT (SELECT COUNT(*) FROM some_table) FROM ...
Default (set by DataProviderBase): true.
[DataMember(Order = 16)]
public bool IsCountSubQuerySupported { get; set; }
Property Value
IsCrossApplyJoinSupportsCondition
Indicates support for CROSS APPLY supports condition LATERAL JOIN for example.
Default (set by DataProviderBase): false.
[DataMember(Order = 19)]
public bool IsCrossApplyJoinSupportsCondition { get; set; }
Property Value
IsCrossJoinSupported
Indicates support for CROSS JOIN.
Default (set by DataProviderBase): true.
[DataMember(Order = 28)]
public bool IsCrossJoinSupported { get; set; }
Property Value
IsCrossJoinSyntaxRequired
When enabled, always prefer "FROM T1 CROSS JOIN T2" over "FROM T1, T2" join syntax.
Default: false.
[DataMember(Order = 61)]
public bool IsCrossJoinSyntaxRequired { get; set; }
Property Value
IsDerivedTableOrderBySupported
Provider supports SUM/AVG/MIN/MAX(DISTINCT column) function. Otherwise, it will be emulated.
Default (set by DataProviderBase): true.
[DataMember(Order = 52)]
public bool IsDerivedTableOrderBySupported { get; set; }
Property Value
IsDerivedTableTakeSupported
Indicates support for paging clause in derived table.
Default (set by DataProviderBase): true.
[DataMember(Order = 9)]
public bool IsDerivedTableTakeSupported { get; set; }
Property Value
IsDistinctFromSupported
Provider supports correlated DISTINCT FROM directly or through db-specific operator/method (e.g. DECODE, IS, <=>).
This doesn't include emulation using INTERSECT.
Default false
[DataMember(Order = 58)]
public bool IsDistinctFromSupported { get; set; }
Property Value
IsDistinctSetOperationsSupported
Provider supports EXCEPT, INTERSECT set operators. Otherwise it will be emulated.
Default (set by DataProviderBase): true.
[DataMember(Order = 32)]
public bool IsDistinctSetOperationsSupported { get; set; }
Property Value
IsExistsPreferableForContains
Default value: false.
[DataMember(Order = 39)]
public bool IsExistsPreferableForContains { get; set; }
Property Value
IsIdentityParameterRequired
Indicates that provider requires explicit output parameter for insert with identity queries to get identity from database.
Default (set by DataProviderBase): false.
[DataMember(Order = 17)]
public bool IsIdentityParameterRequired { get; set; }
Property Value
IsInsertOrUpdateSupported
Indicates support for single-query insert-or-update operation support.
Otherwise two separate queries used to emulate operation (update, then insert if nothing found to update).
Default (set by DataProviderBase): true.
[DataMember(Order = 21)]
public bool IsInsertOrUpdateSupported { get; set; }
Property Value
IsJoinDerivedTableWithTakeInvalid
Indicates that provider has issue with any JOIN to subquery which has TOP statement.
Default false.
[DataMember(Order = 10)]
public bool IsJoinDerivedTableWithTakeInvalid { get; set; }
Property Value
Remarks
Currently use as workaround over Sybase bug.
IsMultiTablesSupportsJoins
Indicates that provider supports JOINS in FROM clause which have several tables
SELECT ...
FROM table1
INNER JOIN query ON ...
, table2
Otherwise the following query will be generated:
SELECT ...
FROM (
SELECT ...
FROM table1, table2
) S
INNER JOIN query ON ... ,
FROM table2
Default: true.
[DataMember(Order = 46)]
public bool IsMultiTablesSupportsJoins { get; set; }
Property Value
IsNamingQueryBlockSupported
[DataMember(Order = 35)]
public bool IsNamingQueryBlockSupported { get; set; }
Property Value
IsNestedJoinsSupported
Provider supports nested joins
A JOIN (B JOIN C ON ?) ON ?
otherwise nested join replaced with sub-query
A JOIN (SELECT ? FROM B JOIN C ON ?) ON ?.
Default (set by DataProviderBase): true.
[DataMember(Order = 51)]
public bool IsNestedJoinsSupported { get; set; }
Property Value
IsOrderByAggregateFunctionSupported
Provider supports Aggregate function in ORDER BY.
Default (set by DataProviderBase): true.
[DataMember(Order = 59)]
public bool IsOrderByAggregateFunctionSupported { get; set; }
Property Value
Remarks
Applied only to SqlCe provider.
IsOuterApplyJoinSupportsCondition
Indicates support for OUTER APPLY supports condition LATERAL JOIN for example.
Default (set by DataProviderBase): false.
[DataMember(Order = 20)]
public bool IsOuterApplyJoinSupportsCondition { get; set; }
Property Value
IsOuterJoinSupportsInnerJoin
Provider supports INNER JOIN inside OUTER JOIN. For example:
LEFT JOIN table1 ON ...
INNER JOIN query ON ...
Otherwise the following query will be left:
LEFT JOIN (
SELECT ...
FROM table1
INNER JOIN query ON ...
)
Default: true.
[DataMember(Order = 45)]
public bool IsOuterJoinSupportsInnerJoin { get; set; }
Property Value
IsParameterOrderDependent
Indicates that provider (not database!) uses positional parameters instead of named parameters (parameter values assigned in order they appear in query, not by parameter name).
Default (set by DataProviderBase): false.
[DataMember(Order = 2)]
public bool IsParameterOrderDependent { get; set; }
Property Value
IsRecursiveCTEJoinWithConditionSupported
Provider supports INNER JOIN with condition inside Recursive CTE, currently not supported only by DB2
Default value: true.
[DataMember(Order = 44)]
public bool IsRecursiveCTEJoinWithConditionSupported { get; set; }
Property Value
IsRowNumberWithoutOrderBySupported
Provider supports ROW_NUMBER OVER () without ORDER BY
Default value: true.
[DataMember(Order = 40)]
public bool IsRowNumberWithoutOrderBySupported { get; set; }
Property Value
IsSkipSupported
Indicates support for SKIP/OFFSET paging clause (parameter) without TAKE clause.
Provider could set this flag even if database not support it if emulates missing functionality.
E.g. : TAKE [MAX_ALLOWED_VALUE] SKIP skip_value
Default (set by DataProviderBase): true.
[DataMember(Order = 5)]
public bool IsSkipSupported { get; set; }
Property Value
IsSkipSupportedIfTake
Indicates support for SKIP/OFFSET paging clause (parameter) only if also TAKE/LIMIT specified.
Default (set by DataProviderBase): false.
[DataMember(Order = 6)]
public bool IsSkipSupportedIfTake { get; set; }
Property Value
IsSubQueryColumnSupported
Indicates support for scalar subquery in select list.
E.g. SELECT (SELECT TOP 1 value FROM some_table) AS MyColumn, ...
Default (set by DataProviderBase): true.
[DataMember(Order = 14)]
public bool IsSubQueryColumnSupported { get; set; }
Property Value
IsSubQueryOrderBySupported
Indicates support of ORDER BY clause in sub-queries.
Default (set by DataProviderBase): false.
[DataMember(Order = 15)]
public bool IsSubQueryOrderBySupported { get; set; }
Property Value
IsSubQuerySkipSupported
Indicates support for skip clause in column expression subquery.
Default (set by DataProviderBase): true.
[DataMember(Order = 13)]
public bool IsSubQuerySkipSupported { get; set; }
Property Value
IsSubQueryTakeSupported
Indicates support for paging clause in subquery.
Default (set by DataProviderBase): true.
[DataMember(Order = 8)]
public bool IsSubQueryTakeSupported { get; set; }
Property Value
IsSubqueryWithParentReferenceInJoinConditionSupported
Provider supports condition in subquery which references parent table
Default value: true.
[DataMember(Order = 41)]
public bool IsSubqueryWithParentReferenceInJoinConditionSupported { get; set; }
Property Value
IsSupportedSimpleCorrelatedSubqueries
Provider supports correlated subqueris, which can be easily converted to JOIN.
Default (set by DataProviderBase): false.
[DataMember(Order = 55)]
public bool IsSupportedSimpleCorrelatedSubqueries { get; set; }
Property Value
Remarks
Applied only to ClickHouse provider.
IsSupportsJoinWithoutCondition
Indicates that provider supports JOIN without condition ON 1=1.
Default (set by DataProviderBase): true.
[DataMember(Order = 12)]
public bool IsSupportsJoinWithoutCondition { get; set; }
Property Value
IsUpdateFromSupported
Indicates support for following UPDATE syntax:
UPDATE A
SET ...
FROM B
Default (set by DataProviderBase): true.
[DataMember(Order = 34)]
public bool IsUpdateFromSupported { get; set; }
Property Value
IsUpdateSkipTakeSupported
Provider supports SKIP+TAKE limit for UPDATE query.
Default (set by DataProviderBase): false.
[DataMember(Order = 54)]
public bool IsUpdateSkipTakeSupported { get; set; }
Property Value
IsUpdateTakeSupported
Provider supports TAKE limit for UPDATE query.
Default (set by DataProviderBase): false.
[DataMember(Order = 53)]
public bool IsUpdateTakeSupported { get; set; }
Property Value
IsWindowFunctionsSupported
Indicates that provider supports window functions.
Default value: true.
[DataMember(Order = 36)]
public bool IsWindowFunctionsSupported { get; set; }
Property Value
MaxInListValuesCount
Specifies limit of number of values in single IN predicate without splitting it into several IN's.
Default (set by DataProviderBase): int.MaxValue (basically means there is no limit).
[DataMember(Order = 23)]
public int MaxInListValuesCount { get; set; }
Property Value
OutputDeleteUseSpecialTable
If true, removed record fields in OUTPUT clause of DELETE statement should be referenced using
table with special name (e.g. DELETED or OLD). Otherwise fields should be referenced using target table.
Default (set by DataProviderBase): false.
[DataMember(Order = 24)]
public bool OutputDeleteUseSpecialTable { get; set; }
Property Value
OutputInsertUseSpecialTable
If true, added record fields in OUTPUT clause of INSERT statement should be referenced using
table with special name (e.g. INSERTED or NEW). Otherwise fields should be referenced using target table.
Default (set by DataProviderBase): false.
[DataMember(Order = 25)]
public bool OutputInsertUseSpecialTable { get; set; }
Property Value
OutputMergeUseSpecialTables
If true, OUTPUT clause supports both OLD and NEW data in MERGE statement using tables with special names.
Otherwise only current record fields (after all changes) available using target table.
Default (set by DataProviderBase): false.
[DataMember(Order = 27)]
public bool OutputMergeUseSpecialTables { get; set; }
Property Value
OutputUpdateUseSpecialTables
If true, OUTPUT clause supports both OLD and NEW data in UPDATE statement using tables with special names.
Otherwise only current record fields (after update) available using target table.
Default (set by DataProviderBase): false.
[DataMember(Order = 26)]
public bool OutputUpdateUseSpecialTables { get; set; }
Property Value
RowConstructorSupport
Provider support Row Constructor (1, 2, 3) in various positions (flags)
Default (set by DataProviderBase): None.
[DataMember(Order = 38)]
public RowFeature RowConstructorSupport { get; set; }
Property Value
SupportedCorrelatedSubqueriesLevel
Provider supports correlated subqueris, but limited how deep in subquery outer reference
Default null. If this value is 0c>, provider do not support correlated subqueries
[DataMember(Order = 56)]
public int? SupportedCorrelatedSubqueriesLevel { get; set; }
Property Value
- int?
SupportsBooleanType
Indicates that boolean type could be used as predicate without additional conversions.
Default value: true.
[DataMember(Order = 50)]
public bool SupportsBooleanType { get; set; }
Property Value
SupportsPredicatesComparison
Indicates that provider supports direct comparison of predicates.
Default value: false.
[DataMember(Order = 49)]
public bool SupportsPredicatesComparison { get; set; }
Property Value
TakeHintsSupported
Indicates supported TAKE/LIMIT hints.
Default (set by DataProviderBase): null (none).
[DataMember(Order = 7)]
public TakeHints? TakeHintsSupported { get; set; }
Property Value
Methods
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetAcceptsTakeAsParameterFlag(SelectQuery)
public bool GetAcceptsTakeAsParameterFlag(SelectQuery selectQuery)
Parameters
selectQuerySelectQuery
Returns
GetHashCode()
public override int GetHashCode()
Returns
GetIsSkipSupportedFlag(ISqlExpression?)
public bool GetIsSkipSupportedFlag(ISqlExpression? takeExpression)
Parameters
takeExpressionISqlExpression
Returns
GetIsTakeHintsSupported(TakeHints)
public bool GetIsTakeHintsSupported(TakeHints hints)
Parameters
hintsTakeHints