语言

SelectExpression 类

定义

表示 SQL SELECT 表达式。

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

构造函数

名称 说明
SelectExpression(IQuerySqlGeneratorFactory, RelationalQueryCompilationContext, String)

创建 SelectExpression 的新实例。

SelectExpression(IQuerySqlGeneratorFactory, RelationalQueryCompilationContext)

创建 SelectExpression 的新实例。

SelectExpression(SelectExpressionDependencies, RelationalQueryCompilationContext, String)

创建 SelectExpression 的新实例。

SelectExpression(SelectExpressionDependencies, RelationalQueryCompilationContext)

创建 SelectExpression 的新实例。

属性

名称 说明
Alias

获取别名。

(继承自 TableExpressionBase)
Dependencies

用于创建 的依赖项

GroupBy

此 SelectExpression 的 SQL GROUP BY。

Having

获取或设置对应于 SELECT 表达式的 HAVING 部分的谓词。

IsDistinct

获取或设置一个值,该值指示此 SelectExpression 是否为 DISTINCT。

IsProjectStar

获取或设置一个值,该值指示此表达式是否投影单个通配符('*')。

Limit

获取或设置此 SelectExpression 的 LIMIT。

NodeType

返回此 Expression类型的节点类型。 (继承自 Expression.)

(继承自 TableExpressionBase)
Offset

获取或设置此 SelectExpression 的 OFFSET。

OrderBy

此 SelectExpression 的 SQL ORDER BY。

Predicate

获取或设置与 SELECT 表达式的 WHERE 部分对应的谓词。

Projection

此 SelectExpression 的投影。

ProjectStarAlias

获取或设置要用于星形投影的表别名。

ProjectStarTable

获取或设置要用于星形投影的表。

QuerySource

获取查询源。

(继承自 TableExpressionBase)
Tables

构成 SELECT 表达式的 FROM 部分的表。

Tags

与此 SelectExpression 关联的任何标记。

Type

此表达式的类型。

方法

名称 说明
Accept(ExpressionVisitor)

调度到此节点类型的特定访问方法。

AddAliasToProjection(String, Expression)

向投影添加别名的表达式。

AddCrossJoin(TableExpressionBase, IEnumerable<Expression>)

将 SQL CROSS JOIN 添加到此 SelectExpression。

AddCrossJoinLateral(TableExpressionBase, IEnumerable<Expression>)

将 SQL CROSS JOIN 横向添加到此 SelectExpression。

AddInnerJoin(TableExpressionBase, IEnumerable<Expression>, Expression)

将 SQL INNER JOIN 添加到此 SelectExpression。

AddInnerJoin(TableExpressionBase, IEnumerable<Expression>)

将 SQL INNER JOIN 添加到此 SelectExpression。

AddInnerJoin(TableExpressionBase)

将 SQL INNER JOIN 添加到此 SelectExpression。

AddLateralJoin(TableExpressionBase, IEnumerable<Expression>)

将 SQL 横向联接添加到此 SelectExpression。

AddLeftOuterJoin(TableExpressionBase, IEnumerable<Expression>)

将 SQL LEFT OUTER JOIN 添加到此 SelectExpression。

AddLeftOuterJoin(TableExpressionBase)

将 SQL LEFT OUTER JOIN 添加到此 SelectExpression。

AddTable(TableExpressionBase, Boolean)

将表添加到此 SelectExpression。

AddTable(TableExpressionBase)

将表添加到此 SelectExpression。

AddTables(IEnumerable<TableExpressionBase>)

将表添加到此 SelectExprssion。

AddToGroupBy(Expression[])

将表达式列表添加到此 SelectExpression 的 GROUP BY 子句

AddToOrderBy(IEnumerable<Ordering>)

将多个表达式添加到此 SelectExpression 的 ORDER BY。

AddToOrderBy(Ordering)

将单个 Remotion.Linq.Clauses.Ordering 添加到订单依据。

AddToOrderBy(String, IProperty, TableExpressionBase, OrderingDirection)

将列添加到此 SelectExpression 的 ORDER BY。

AddToPredicate(Expression)

将谓词表达式添加到此 SelectExpression,如有必要,将其与任何现有谓词组合在一起。

AddToProjection(AliasExpression)

向投影添加一个 AliasExpression 。

AddToProjection(ColumnExpression)

向投影添加 ColumnExpression。

AddToProjection(Expression, Boolean)

将表达式添加到投影。

AddToProjection(Expression)

将表达式添加到投影。

AddToProjection(IProperty, IQuerySource)

向投影添加列。

AddToProjection(String, IProperty, IQuerySource)

向投影添加列。

BindProperty(IProperty, IQuerySource)

为提供的属性生成绑定到此 select 表达式的表达式。

BindSubqueryProjectionIndex(Int32, IQuerySource)

计算与提供的索引和查询源对应的绑定表达式。

Clear()

清除此 SelectExpression 的所有元素。

ClearColumnProjections()

从投影中清除列表达式。

ClearOrderBy()

清除此 SelectExpression 的 ORDER BY。

ClearProjection()

清除投影。

ClearTables()

删除添加到此 SelectExpression 的任何表。

Clone(String)

制作此 SelectExpression 的副本。

CreateDefaultQuerySqlGenerator()

创建默认查询 SQL 生成器。

CreateFromSqlQuerySqlGenerator(String, Expression)

创建 FromSql 查询 SQL 生成器。

ExplodeStarProjection()

通过将通配符 ('*') 投影扩展到单个显式投影表达式,转换此 SelectExpression 的投影。

GetMappedProjectionTypes()

获取表达式的类型 Projection。

GetProjectionForMemberInfo(MemberInfo)

获取与提供的成员信息对应的投影。

GetProjectionIndex(IProperty, IQuerySource)

计算与提供的属性和查询源对应的索引 Projection 。

GetProjectionTypes()
已过时.

获取表达式的类型 Projection。

GetTableForQuerySource(IQuerySource)

获取与提供的查询源对应的表。

HandlesQuerySource(IQuerySource)

确定此 SelectExpression 是否处理给定的查询源。

IsCorrelated()

确定此 SelectExpression 是否包含任何相关的子查询。

IsIdentityQuery()

确定此 SelectExpression 是否为标识查询。 标识查询具有单个表,并返回该表中的所有行(未修改)。

LiftOrderBy()

确保从此选择表达式的 Project Star 表按表达式的顺序复制到外部级别以保留排序。

PrependToOrderBy(IEnumerable<Ordering>)

在此 SelectExpression 的 ORDER BY 前面追加多个排序表达式。

PreProcessQuerySource(IQuerySource)

预处理给定 Remotion.Linq.Clauses.IQuerySource的 。

(继承自 TableExpressionBase)
PushDownSubquery()

基于此 SelectExpression 创建子查询,并使该表成为单个条目。Tables 清除此 SelectExpression 的所有其他顶级方面。

RemoveFromProjection(IEnumerable<Ordering>)

从与提供的 Remotion.Linq.Clauses.Ordering 表达式对应的投影中删除表达式。

RemoveRangeFromProjection(Int32)

从投影中删除范围。

RemoveTable(TableExpressionBase)

从此 SelectExpression 中删除表。

ReplaceOrderBy(IEnumerable<Ordering>)
已过时.

将当前排序替换为作为参数传递的表达式

ReplaceProjection(IEnumerable<Expression>)

替换此 SelectExpression 中的投影表达式。

SetProjectionConditionalExpression(ConditionalExpression)

在此 SelectExpression 中将一个 ConditionalExpression 设置为单个投影表达式。

SetProjectionExpression(Expression)

在此 SelectExpression 中将表达式设置为单个投影表达式。

SetProjectionForMemberInfo(MemberInfo, Expression)

将提供的表达式设置为提供的成员信息的投影。

ToString()

将此对象转换为字符串表示形式。

UpdateColumnExpression(Expression, TableExpressionBase)

更新目标表达式中任何列表达式的表表达式。

VisitChildren(ExpressionVisitor)

减少节点,然后调用 Visit(Expression) 传递化简表达式的方法。 如果节点不可减少,则引发异常。

适用于