Class SelectQuery
public sealed class SelectQuery : SqlExpressionBase, ISqlTableSource, ISqlExpression, IQueryElement, IEquatable<ISqlExpression>
- Inheritance
-
SelectQuery
- Implements
- Inherited Members
- Extension Methods
Constructors
SelectQuery()
public SelectQuery()
Fields
SourceIDCounter
public static int SourceIDCounter
Field Value
Properties
All
public SqlField All { 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
AST node type.
public override 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 SqlHavingClause Having { get; }
Property Value
IsLimited
public bool IsLimited { get; }
Property Value
IsParameterDependent
public bool IsParameterDependent { get; set; }
Property Value
IsSimple
public bool IsSimple { get; }
Property Value
IsSimpleButWhere
public bool IsSimpleButWhere { get; }
Property Value
IsSimpleOrSet
public bool IsSimpleOrSet { get; }
Property Value
OrderBy
public SqlOrderByClause OrderBy { get; }
Property Value
Precedence
public override 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 override 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
unionSelectQueryisAllbool
CanBeNullable(NullabilityContext)
public override bool CanBeNullable(NullabilityContext nullability)
Parameters
nullabilityNullabilityContext
Returns
Cleanup()
public void Cleanup()
CloneQuery()
public SelectQuery CloneQuery()
Returns
Equals(ISqlExpression, Func<ISqlExpression, ISqlExpression, bool>)
public override bool Equals(ISqlExpression other, Func<ISqlExpression, ISqlExpression, bool> comparer)
Parameters
otherISqlExpressioncomparerFunc<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
contextTContextactionAction<TContext, SqlTableSource>visitedQueriesHashSet<SelectQuery>
Type Parameters
TContext
GetElementHashCode()
public override int GetElementHashCode()
Returns
GetKeys(bool)
public IList<ISqlExpression>? GetKeys(bool allIfEmpty)
Parameters
allIfEmptybool
Returns
GetTableSource(ISqlTableSource)
public ISqlTableSource? GetTableSource(ISqlTableSource table)
Parameters
tableISqlTableSource
Returns
ToString(QueryElementTextWriter)
Generates debug text representation of AST node.
public override QueryElementTextWriter ToString(QueryElementTextWriter writer)
Parameters
writerQueryElementTextWriter