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