Share via


SelectExpression Class

Definition

Represents a SQL SELECT expression.

public class SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase
type SelectExpression = class
    inherit TableExpressionBase
Public Class SelectExpression
Inherits TableExpressionBase
Inheritance
SelectExpression

Constructors

SelectExpression(IQuerySqlGeneratorFactory, RelationalQueryCompilationContext, String)

Creates a new instance of SelectExpression.

SelectExpression(IQuerySqlGeneratorFactory, RelationalQueryCompilationContext)

Creates a new instance of SelectExpression.

SelectExpression(SelectExpressionDependencies, RelationalQueryCompilationContext, String)

Creates a new instance of SelectExpression.

SelectExpression(SelectExpressionDependencies, RelationalQueryCompilationContext)

Creates a new instance of SelectExpression.

Properties

Alias

Gets the alias.

(Inherited from TableExpressionBase)
Dependencies

Dependencies used to create a SelectExpression

GroupBy

The SQL GROUP BY of this SelectExpression.

Having

Gets or sets the predicate corresponding to the HAVING part of the SELECT expression.

IsDistinct

Gets or sets a value indicating whether this SelectExpression is DISTINCT.

IsProjectStar

Gets or sets a value indicating whether this expression projects a single wildcard ('*').

Limit

Gets or sets the LIMIT of this SelectExpression.

NodeType

Returns the node type of this Expression. (Inherited from Expression.)

(Inherited from TableExpressionBase)
Offset

Gets or sets the OFFSET of this SelectExpression.

OrderBy

The SQL ORDER BY of this SelectExpression.

Predicate

Gets or sets the predicate corresponding to the WHERE part of the SELECT expression.

Projection

The projection of this SelectExpression.

ProjectStarAlias

Gets or sets the table alias to be used for star projection.

ProjectStarTable

Gets or sets the table to be used for star projection.

QuerySource

Gets the query source.

(Inherited from TableExpressionBase)
Tables

The tables making up the FROM part of the SELECT expression.

Tags

Any tags associated with this SelectExpression.

Type

Type of this expression.

Methods

Accept(ExpressionVisitor)

Dispatches to the specific visit method for this node type.

AddAliasToProjection(String, Expression)

Adds an expression with an alias to the projection.

AddCrossJoin(TableExpressionBase, IEnumerable<Expression>)

Adds a SQL CROSS JOIN to this SelectExpression.

AddCrossJoinLateral(TableExpressionBase, IEnumerable<Expression>)

Adds a SQL CROSS JOIN LATERAL to this SelectExpression.

AddInnerJoin(TableExpressionBase, IEnumerable<Expression>, Expression)

Adds a SQL INNER JOIN to this SelectExpression.

AddInnerJoin(TableExpressionBase, IEnumerable<Expression>)

Adds a SQL INNER JOIN to this SelectExpression.

AddInnerJoin(TableExpressionBase)

Adds a SQL INNER JOIN to this SelectExpression.

AddLateralJoin(TableExpressionBase, IEnumerable<Expression>)

Adds a SQL LATERAL JOIN to this SelectExpression.

AddLeftOuterJoin(TableExpressionBase, IEnumerable<Expression>)

Adds a SQL LEFT OUTER JOIN to this SelectExpression.

AddLeftOuterJoin(TableExpressionBase)

Adds a SQL LEFT OUTER JOIN to this SelectExpression.

AddTable(TableExpressionBase, Boolean)

Adds a table to this SelectExpression.

AddTable(TableExpressionBase)

Adds a table to this SelectExpression.

AddTables(IEnumerable<TableExpressionBase>)

Adds tables to this SelectExprssion.

AddToGroupBy(Expression[])

Adds list of expressions to the GROUP BY clause of this SelectExpression

AddToOrderBy(IEnumerable<Ordering>)

Adds multiple expressions to the ORDER BY of this SelectExpression.

AddToOrderBy(Ordering)

Adds a single Remotion.Linq.Clauses.Ordering to the order by.

AddToOrderBy(String, IProperty, TableExpressionBase, OrderingDirection)

Adds a column to the ORDER BY of this SelectExpression.

AddToPredicate(Expression)

Adds a predicate expression to this SelectExpression, combining it with any existing predicate if necessary.

AddToProjection(AliasExpression)

Adds an AliasExpression to the projection.

AddToProjection(ColumnExpression)

Adds a ColumnExpression to the projection.

AddToProjection(Expression, Boolean)

Adds an expression to the projection.

AddToProjection(Expression)

Adds an expression to the projection.

AddToProjection(IProperty, IQuerySource)

Adds a column to the projection.

AddToProjection(String, IProperty, IQuerySource)

Adds a column to the projection.

BindProperty(IProperty, IQuerySource)

Generates an expression bound to this select expression for the supplied property.

BindSubqueryProjectionIndex(Int32, IQuerySource)

Computes the bound expression corresponding to the supplied index and query source.

Clear()

Clears all elements of this SelectExpression.

ClearColumnProjections()

Clears the column expressions from the projection.

ClearOrderBy()

Clears the ORDER BY of this SelectExpression.

ClearProjection()

Clears the projection.

ClearTables()

Removes any tables added to this SelectExpression.

Clone(String)

Makes a copy of this SelectExpression.

CreateDefaultQuerySqlGenerator()

Creates the default query SQL generator.

CreateFromSqlQuerySqlGenerator(String, Expression)

Creates the FromSql query SQL generator.

ExplodeStarProjection()

Transforms the projection of this SelectExpression by expanding the wildcard ('*') projection into individual explicit projection expressions.

GetMappedProjectionTypes()

Gets the types of the expressions in Projection.

GetProjectionForMemberInfo(MemberInfo)

Gets the projection corresponding to supplied member info.

GetProjectionIndex(IProperty, IQuerySource)

Computes the index in Projection corresponding to the supplied property and query source.

GetProjectionTypes()
Obsolete.

Gets the types of the expressions in Projection.

GetTableForQuerySource(IQuerySource)

Gets the table corresponding to the supplied query source.

HandlesQuerySource(IQuerySource)

Determines whether or not this SelectExpression handles the given query source.

IsCorrelated()

Determines if this SelectExpression contains any correlated subqueries.

IsIdentityQuery()

Determines whether this SelectExpression is an identity query. An identity query has a single table, and returns all of the rows from that table, unmodified.

LiftOrderBy()

Ensure that order by expressions from Project Star table of this select expression are copied on outer level to preserve ordering.

PrependToOrderBy(IEnumerable<Ordering>)

Prepends multiple ordering expressions to the ORDER BY of this SelectExpression.

PreProcessQuerySource(IQuerySource)

Pre-processes the given Remotion.Linq.Clauses.IQuerySource.

(Inherited from TableExpressionBase)
PushDownSubquery()

Creates a subquery based on this SelectExpression and makes that table the single entry in Tables. Clears all other top-level aspects of this SelectExpression.

RemoveFromProjection(IEnumerable<Ordering>)

Removes expressions from the projection corresponding to the supplied Remotion.Linq.Clauses.Ordering expressions.

RemoveRangeFromProjection(Int32)

Removes a range from the projection.

RemoveTable(TableExpressionBase)

Removes a table from this SelectExpression.

ReplaceOrderBy(IEnumerable<Ordering>)
Obsolete.

Replaces current ordering with expressions passed as parameter

ReplaceProjection(IEnumerable<Expression>)

Replace the projection expressions in this SelectExpression.

SetProjectionConditionalExpression(ConditionalExpression)

Sets a ConditionalExpression as the single projected expression in this SelectExpression.

SetProjectionExpression(Expression)

Sets an expression as the single projected expression in this SelectExpression.

SetProjectionForMemberInfo(MemberInfo, Expression)

Sets the supplied expression as the projection for the supplied member info.

ToString()

Convert this object into a string representation.

UpdateColumnExpression(Expression, TableExpressionBase)

Updates the table expression of any column expressions in the target expression.

VisitChildren(ExpressionVisitor)

Reduces the node and then calls the Visit(Expression) method passing the reduced expression. Throws an exception if the node isn't reducible.

Applies to