Table of Contents

Class SqlProviderFlags

Namespace
LinqToDB.SqlProvider
Assembly
linq2db.dll
[DataContract]
public sealed class SqlProviderFlags
Inheritance
SqlProviderFlags
Extension Methods

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 = 31)]
public bool AcceptsOuterExpressionInAggregate { get; set; }

Property Value

bool

AcceptsTakeAsParameter

Indicates that TAKE/TOP/LIMIT could accept parameter. Default (set by DataProviderBase): true.

[DataMember(Order = 3)]
public bool AcceptsTakeAsParameter { get; set; }

Property Value

bool

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

bool

CanCombineParameters

Indicates that provider could share parameter between statements in multi-statement batch. Default (set by DataProviderBase): true.

[DataMember(Order = 16)]
public bool CanCombineParameters { get; set; }

Property Value

bool

CustomFlags

Flags for use by external providers.

[DataMember(Order = 36)]
public List<string> CustomFlags { get; set; }

Property Value

List<string>

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 = 34)]
public IsolationLevel DefaultMultiQueryIsolationLevel { get; set; }

Property Value

IsolationLevel

DoesNotSupportCorrelatedSubquery

[DataMember(Order = 37)]
public bool DoesNotSupportCorrelatedSubquery { get; set; }

Property Value

bool

IsAllSetOperationsSupported

Provider supports EXCEPT ALL, INTERSECT ALL set operators. Otherwise they will be emulated. Default (set by DataProviderBase): false.

[DataMember(Order = 28)]
public bool IsAllSetOperationsSupported { get; set; }

Property Value

bool

IsApplyJoinSupported

Indicates support for OUTER/CROSS APPLY. Default (set by DataProviderBase): false.

[DataMember(Order = 14)]
public bool IsApplyJoinSupported { get; set; }

Property Value

bool

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 = 25)]
public bool IsCommonTableExpressionsSupported { get; set; }

Property Value

bool

IsCountDistinctSupported

Provider supports COUNT(DISTINCT column) function. Otherwise it will be emulated. Default (set by DataProviderBase): false.

[DataMember(Order = 30)]
public bool IsCountDistinctSupported { get; set; }

Property Value

bool

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 = 12)]
public bool IsCountSubQuerySupported { get; set; }

Property Value

bool

IsCrossJoinSupported

Indicates support for CROSS JOIN. Default (set by DataProviderBase): true.

[DataMember(Order = 23)]
public bool IsCrossJoinSupported { get; set; }

Property Value

bool

IsDistinctOrderBySupported

Indicates that database supports and correctly handles DISTINCT queries with ORDER BY over fields missing from projection. Otherwise:

Default (set by DataProviderBase): true.

[DataMember(Order = 26)]
public bool IsDistinctOrderBySupported { get; set; }

Property Value

bool

IsDistinctSetOperationsSupported

Provider supports EXCEPT, INTERSECT set operators. Otherwise it will be emulated. Default (set by DataProviderBase): true.

[DataMember(Order = 29)]
public bool IsDistinctSetOperationsSupported { get; set; }

Property Value

bool

IsExistsPreferableForContains

[DataMember(Order = 38)]
public bool IsExistsPreferableForContains { get; set; }

Property Value

bool

IsGroupByColumnRequred

Provider requires that selected subquery column must be used in group by even for constant column. Default (set by DataProviderBase): false.

[DataMember(Order = 22)]
public bool IsGroupByColumnRequred { get; set; }

Property Value

bool

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 = 13)]
public bool IsIdentityParameterRequired { get; set; }

Property Value

bool

IsInnerJoinAsCrossSupported

Indicates support for CROSS JOIN emulation using INNER JOIN a ON 1 = 1. Currently has no effect if IsCrossJoinSupported enabled but it is recommended to use proper value. Default (set by DataProviderBase): true.

[DataMember(Order = 24)]
public bool IsInnerJoinAsCrossSupported { get; set; }

Property Value

bool

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 = 15)]
public bool IsInsertOrUpdateSupported { get; set; }

Property Value

bool

IsNamingQueryBlockSupported

Provider supports Naming Query Blocks

QB_NAME(qb)

Default (set by DataProviderBase): false.

[DataMember(Order = 33)]
public bool IsNamingQueryBlockSupported { get; set; }

Property Value

bool

IsOrderByAggregateFunctionsSupported

Indicates support for aggregate functions in ORDER BY statement. Default (set by DataProviderBase): true.

[DataMember(Order = 27)]
public bool IsOrderByAggregateFunctionsSupported { get; set; }

Property Value

bool

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

bool

IsProjectionBoolSupported

[DataMember(Order = 39)]
public bool IsProjectionBoolSupported { get; set; }

Property Value

bool

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 = 6)]
public bool IsSkipSupported { get; set; }

Property Value

bool

IsSkipSupportedIfTake

Indicates support for SKIP/OFFSET paging clause (parameter) only if also TAKE/LIMIT specified. Default (set by DataProviderBase): false.

[DataMember(Order = 7)]
public bool IsSkipSupportedIfTake { get; set; }

Property Value

bool

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 = 10)]
public bool IsSubQueryColumnSupported { get; set; }

Property Value

bool

IsSubQueryOrderBySupported

Indicates support of ORDER BY clause in sub-queries. Default (set by DataProviderBase): false.

[DataMember(Order = 11)]
public bool IsSubQueryOrderBySupported { get; set; }

Property Value

bool

IsSubQueryTakeSupported

Indicates support for paging clause in subquery. Default (set by DataProviderBase): true.

[DataMember(Order = 9)]
public bool IsSubQueryTakeSupported { get; set; }

Property Value

bool

IsSybaseBuggyGroupBy

Enables fix for incorrect Sybase ASE behavior for following query:

-- will return single record with 0 value (incorrect)
SELECT 0 as [c1] FROM [Child] [t1] GROUP BY [t1].[ParentID]

Fix enables following SQL generation:

-- works correctly
SELECT [t1].[ParentID] as [c1] FROM [Child] [t1] GROUP BY [t1].[ParentID]

Default (set by DataProviderBase): false.

[DataMember(Order = 1)]
public bool IsSybaseBuggyGroupBy { get; set; }

Property Value

bool

IsTakeSupported

Indicates support for TOP/TAKE/LIMIT paging clause. Default (set by DataProviderBase): true.

[DataMember(Order = 5)]
public bool IsTakeSupported { get; set; }

Property Value

bool

IsUpdateFromSupported

Indicates support for following UPDATE syntax:

UPDATE A
SET ...
FROM B

Default (set by DataProviderBase): true.

[DataMember(Order = 32)]
public bool IsUpdateFromSupported { get; set; }

Property Value

bool

IsUpdateSetTableAliasSupported

Indicates that SET clause in update statement could use table alias prefix for set columns (lvalue): SET t_alias.field = value. Default (set by DataProviderBase): true.

[DataMember(Order = 18)]
public bool IsUpdateSetTableAliasSupported { get; set; }

Property Value

bool

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 = 17)]
public int MaxInListValuesCount { get; set; }

Property Value

int

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 = 19)]
public bool OutputDeleteUseSpecialTable { get; set; }

Property Value

bool

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 = 20)]
public bool OutputInsertUseSpecialTable { get; set; }

Property Value

bool

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 = 21)]
public bool OutputUpdateUseSpecialTables { get; set; }

Property Value

bool

RowConstructorSupport

Provider support Row Constructor (1, 2, 3) in various positions (flags) Default (set by DataProviderBase): None.

[DataMember(Order = 35)]
public RowFeature RowConstructorSupport { get; set; }

Property Value

RowFeature

TakeHintsSupported

Indicates supported TAKE/LIMIT hints. Default (set by DataProviderBase): null (none).

[DataMember(Order = 8)]
public TakeHints? TakeHintsSupported { get; set; }

Property Value

TakeHints?

Methods

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

GetAcceptsTakeAsParameterFlag(SelectQuery)

public bool GetAcceptsTakeAsParameterFlag(SelectQuery selectQuery)

Parameters

selectQuery SelectQuery

Returns

bool

GetHashCode()

Serves as a hash function for a particular type.

public override int GetHashCode()

Returns

int

A hash code for the current object.

GetIsSkipSupportedFlag(ISqlExpression?, ISqlExpression?)

public bool GetIsSkipSupportedFlag(ISqlExpression? takeExpression, ISqlExpression? skipExpression)

Parameters

takeExpression ISqlExpression
skipExpression ISqlExpression

Returns

bool

GetIsTakeHintsSupported(TakeHints)

public bool GetIsTakeHintsSupported(TakeHints hints)

Parameters

hints TakeHints

Returns

bool