Class SelectQuery
Inheritance
System.Object
SelectQuery
Assembly: linq2db.dll
Syntax
public class SelectQuery : object, ISqlTableSource, ISqlExpression, IQueryElement, ISqlExpressionWalkable
Constructors
|
Improve this Doc
View Source
SelectQuery()
Declaration
Fields
|
Improve this Doc
View Source
SourceIDCounter
Declaration
public static int SourceIDCounter
Field Value
Type |
Description |
System.Int32 |
|
Properties
|
Improve this Doc
View Source
All
Declaration
public SqlField All { get; }
Property Value
|
Improve this Doc
View Source
CanBeNull
Declaration
public bool CanBeNull { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
DebugSqlText
Declaration
protected string DebugSqlText { get; }
Property Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
DoNotRemove
Gets or sets flag when sub-query can be removed during optimization.
Declaration
public bool DoNotRemove { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
DoNotSetAliases
Declaration
public bool DoNotSetAliases { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
ElementType
Declaration
public QueryElementType ElementType { get; }
Property Value
|
Improve this Doc
View Source
From
Declaration
public SqlFromClause From { get; }
Property Value
|
Improve this Doc
View Source
GroupBy
Declaration
public SqlGroupByClause GroupBy { get; }
Property Value
|
Improve this Doc
View Source
HasSetOperators
Declaration
public bool HasSetOperators { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
HasUniqueKeys
Declaration
public bool HasUniqueKeys { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Having
Declaration
public SqlWhereClause Having { get; }
Property Value
|
Improve this Doc
View Source
IsParameterDependent
Declaration
public bool IsParameterDependent { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsSimple
Declaration
public bool IsSimple { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsSimpleOrSet
Declaration
public bool IsSimpleOrSet { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
OrderBy
Declaration
public SqlOrderByClause OrderBy { get; }
Property Value
|
Improve this Doc
View Source
ParentSelect
Declaration
public SelectQuery ParentSelect { get; set; }
Property Value
|
Improve this Doc
View Source
Precedence
Declaration
public int Precedence { get; }
Property Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
Properties
Declaration
public List<object> Properties { get; }
Property Value
Type |
Description |
List<System.Object> |
|
|
Improve this Doc
View Source
QueryName
Declaration
public string? QueryName { get; set; }
Property Value
Type |
Description |
System.Nullable<System.String> |
|
|
Improve this Doc
View Source
Select
Declaration
public SqlSelectClause Select { get; }
Property Value
|
Improve this Doc
View Source
SetOperators
Declaration
public List<SqlSetOperator> SetOperators { get; }
Property Value
|
Improve this Doc
View Source
SourceID
Declaration
public int SourceID { get; }
Property Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
SqlQueryExtensions
Declaration
public List<SqlQueryExtension>? SqlQueryExtensions { get; set; }
Property Value
|
Improve this Doc
View Source
SqlTableType
Declaration
public SqlTableType SqlTableType { get; }
Property Value
|
Improve this Doc
View Source
SqlText
Declaration
public string SqlText { get; }
Property Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
SystemType
Declaration
public Type? SystemType { get; }
Property Value
Type |
Description |
System.Nullable<Type> |
|
|
Improve this Doc
View Source
UniqueKeys
Contains list of columns that build unique key for this sub-query.
Used in JoinOptimizer for safely removing sub-query from resulting SQL.
Declaration
public List<ISqlExpression[]> UniqueKeys { get; }
Property Value
|
Improve this Doc
View Source
Where
Declaration
public SqlWhereClause Where { get; }
Property Value
Methods
|
Improve this Doc
View Source
AddUnion(SelectQuery, Boolean)
Declaration
public void AddUnion(SelectQuery union, bool isAll)
Parameters
Type |
Name |
Description |
SelectQuery |
union |
|
System.Boolean |
isAll |
|
|
Improve this Doc
View Source
Equals(ISqlExpression, Func<ISqlExpression, ISqlExpression, Boolean>)
Declaration
public bool Equals(ISqlExpression other, Func<ISqlExpression, ISqlExpression, bool> comparer)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
ForEachTable<TContext>(TContext, Action<TContext, SqlTableSource>, HashSet<SelectQuery>)
Declaration
public void ForEachTable<TContext>(TContext context, Action<TContext, SqlTableSource> action, HashSet<SelectQuery> visitedQueries)
Parameters
Type Parameters
Name |
Description |
TContext |
|
|
Improve this Doc
View Source
GetKeys(Boolean)
Declaration
public IList<ISqlExpression> GetKeys(bool allIfEmpty)
Parameters
Type |
Name |
Description |
System.Boolean |
allIfEmpty |
|
Returns
|
Improve this Doc
View Source
GetTableSource(ISqlTableSource)
Declaration
public ISqlTableSource GetTableSource(ISqlTableSource table)
Parameters
Returns
|
Improve this Doc
View Source
ToString(StringBuilder, Dictionary<IQueryElement, IQueryElement>)
Declaration
public StringBuilder ToString(StringBuilder sb, Dictionary<IQueryElement, IQueryElement> dic)
Parameters
Returns
Type |
Description |
StringBuilder |
|
|
Improve this Doc
View Source
Walk<TContext>(WalkOptions, TContext, Func<TContext, ISqlExpression, ISqlExpression>)
Declaration
public ISqlExpression Walk<TContext>(WalkOptions options, TContext context, Func<TContext, ISqlExpression, ISqlExpression> func)
Parameters
Returns
Type Parameters
Name |
Description |
TContext |
|
Implements
IEquatable<>
Extension Methods