Search Results for

    Show / Hide Table of Contents

    Class SelectQuery

    Inheritance
    System.Object
    SelectQuery
    Implements
    ISqlTableSource
    ISqlExpression
    IQueryElement
    IEquatable<ISqlExpression>
    ISqlExpressionWalkable
    Namespace: LinqToDB.SqlQuery
    Assembly: linq2db.dll
    Syntax
    public class SelectQuery : object, ISqlTableSource, ISqlExpression, IQueryElement, ISqlExpressionWalkable

    Constructors

    | Improve this Doc View Source

    SelectQuery()

    Declaration
    public SelectQuery()

    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
    Type Description
    SqlField
    | 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
    Type Description
    QueryElementType
    | Improve this Doc View Source

    From

    Declaration
    public SqlFromClause From { get; }
    Property Value
    Type Description
    SqlFromClause
    | Improve this Doc View Source

    GroupBy

    Declaration
    public SqlGroupByClause GroupBy { get; }
    Property Value
    Type Description
    SqlGroupByClause
    | 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
    Type Description
    SqlWhereClause
    | 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
    Type Description
    SqlOrderByClause
    | Improve this Doc View Source

    ParentSelect

    Declaration
    public SelectQuery ParentSelect { get; set; }
    Property Value
    Type Description
    SelectQuery
    | 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
    Type Description
    SqlSelectClause
    | Improve this Doc View Source

    SetOperators

    Declaration
    public List<SqlSetOperator> SetOperators { get; }
    Property Value
    Type Description
    List<SqlSetOperator>
    | 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
    Type Description
    System.Nullable<List<SqlQueryExtension>>
    | Improve this Doc View Source

    SqlTableType

    Declaration
    public SqlTableType SqlTableType { get; }
    Property Value
    Type Description
    SqlTableType
    | 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
    Type Description
    List<ISqlExpression[]>
    | Improve this Doc View Source

    Where

    Declaration
    public SqlWhereClause Where { get; }
    Property Value
    Type Description
    SqlWhereClause

    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
    Type Name Description
    ISqlExpression other
    Func<ISqlExpression, ISqlExpression, System.Boolean> comparer
    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 Name Description
    TContext context
    Action<TContext, SqlTableSource> action
    HashSet<SelectQuery> visitedQueries
    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
    Type Description
    IList<ISqlExpression>
    | Improve this Doc View Source

    GetTableSource(ISqlTableSource)

    Declaration
    public ISqlTableSource GetTableSource(ISqlTableSource table)
    Parameters
    Type Name Description
    ISqlTableSource table
    Returns
    Type Description
    ISqlTableSource
    | Improve this Doc View Source

    ToString(StringBuilder, Dictionary<IQueryElement, IQueryElement>)

    Declaration
    public StringBuilder ToString(StringBuilder sb, Dictionary<IQueryElement, IQueryElement> dic)
    Parameters
    Type Name Description
    StringBuilder sb
    Dictionary<IQueryElement, IQueryElement> dic
    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
    Type Name Description
    WalkOptions options
    TContext context
    Func<TContext, ISqlExpression, ISqlExpression> func
    Returns
    Type Description
    ISqlExpression
    Type Parameters
    Name Description
    TContext

    Implements

    ISqlTableSource
    ISqlExpression
    IQueryElement
    IEquatable<>
    ISqlExpressionWalkable

    Extension Methods

    Map.DeepCopy<T>(T)
    Sql.IsDistinctFrom<T>(T, T)
    Sql.IsNotDistinctFrom<T>(T, T)
    QueryHelper.RootQuery(SelectQuery)
    QueryHelper.FindJoin(SelectQuery, Func<SqlJoinedTable, Boolean>)
    QueryHelper.TransformInnerJoinsToWhere(SelectQuery)
    QueryHelper.RemoveNotUnusedColumns(SelectQuery)
    SqlExtensions.In<T>(T, IEnumerable<T>)
    SqlExtensions.In<T>(T, IQueryable<T>)
    SqlExtensions.In<T>(T, T[])
    SqlExtensions.In<T>(T, T, T)
    SqlExtensions.In<T>(T, T, T, T)
    SqlExtensions.NotIn<T>(T, IEnumerable<T>)
    SqlExtensions.NotIn<T>(T, IQueryable<T>)
    SqlExtensions.NotIn<T>(T, T[])
    SqlExtensions.NotIn<T>(T, T, T)
    SqlExtensions.NotIn<T>(T, T, T, T)
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2011-2022 linq2db.com

    Generated by DocFX