Udostępnij za pośrednictwem


RelationalQueryableMethodTranslatingExpressionVisitor Class

Definition

A class that translates queryable methods in a query.

This type is typically used by database providers (and other extensions). It is generally not used in application code.

public class RelationalQueryableMethodTranslatingExpressionVisitor : Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor
type RelationalQueryableMethodTranslatingExpressionVisitor = class
    inherit QueryableMethodTranslatingExpressionVisitor
Public Class RelationalQueryableMethodTranslatingExpressionVisitor
Inherits QueryableMethodTranslatingExpressionVisitor
Inheritance
RelationalQueryableMethodTranslatingExpressionVisitor

Constructors

RelationalQueryableMethodTranslatingExpressionVisitor(QueryableMethodTranslatingExpressionVisitorDependencies, RelationalQueryableMethodTranslatingExpressionVisitorDependencies, IModel)
RelationalQueryableMethodTranslatingExpressionVisitor(QueryableMethodTranslatingExpressionVisitorDependencies, RelationalQueryableMethodTranslatingExpressionVisitorDependencies, QueryCompilationContext)

Creates a new instance of the QueryableMethodTranslatingExpressionVisitor class.

RelationalQueryableMethodTranslatingExpressionVisitor(QueryableMethodTranslatingExpressionVisitorDependencies, RelationalQueryableMethodTranslatingExpressionVisitorDependencies, RelationalQueryCompilationContext)

Creates a new instance of the QueryableMethodTranslatingExpressionVisitor class.

RelationalQueryableMethodTranslatingExpressionVisitor(RelationalQueryableMethodTranslatingExpressionVisitor)

Creates a new instance of the QueryableMethodTranslatingExpressionVisitor class.

Fields

ValuesOrderingColumnName

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

ValuesValueColumnName

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

Properties

Dependencies

Dependencies for this service.

(Inherited from QueryableMethodTranslatingExpressionVisitor)
QueryCompilationContext

The query compilation context object for current compilation.

(Inherited from QueryableMethodTranslatingExpressionVisitor)
RelationalDependencies

Relational provider-specific dependencies for this service.

TranslationErrorDetails

Detailed information about errors encountered during translation.

(Inherited from QueryableMethodTranslatingExpressionVisitor)

Methods

AddTranslationErrorDetails(String)

Adds detailed information about errors encountered during translation.

(Inherited from QueryableMethodTranslatingExpressionVisitor)
ApplyInferredTypeMappings(Expression, IReadOnlyDictionary<ValueTuple<TableExpressionBase,String>,RelationalTypeMapping>)

Invoked at the end of top-level translation, applies inferred type mappings for queryable constants/parameters and verifies that all SqlExpression have a type mapping.

CreateSelect(IEntityType)

Used to create a root SelectExpression representing a query of the given entity type.

CreateSelect(JsonQueryExpression, TableExpressionBase, String, Type, RelationalTypeMapping)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

CreateShapedQueryExpression(IEntityType)

Creates a ShapedQueryExpression for the given entity type.

CreateShapedQueryExpression(IEntityType)

Creates a ShapedQueryExpression for the given entity type.

(Inherited from QueryableMethodTranslatingExpressionVisitor)
CreateShapedQueryExpression(Type)
Obsolete.

Creates a ShapedQueryExpression for the given type by finding its entity type in the model.

CreateShapedQueryExpression(Type)
Obsolete.

Creates a ShapedQueryExpression for the given type by finding its entity type in the model.

(Inherited from QueryableMethodTranslatingExpressionVisitor)
CreateSubqueryVisitor()

Creates a visitor customized to translate a subquery through TranslateSubquery(Expression).

IsNaturallyOrdered(SelectExpression)

Determines whether the given SelectExpression is naturally ordered, meaning that any ordering has been added automatically by EF to preserve e.g. the natural ordering of a JSON array, and not because the original LINQ query contained an explicit ordering.

IsOrdered(SelectExpression)

Determines whether the given SelectExpression is ordered, typically because orderings have been added to it.

IsValidSelectExpressionForExecuteDelete(SelectExpression, EntityShaperExpression, TableExpression)

Checks weather the current select expression can be used as-is for execute a delete operation, or whether it must be pushed down into a subquery.

IsValidSelectExpressionForExecuteDelete(SelectExpression, StructuralTypeShaperExpression, TableExpression)

Checks weather the current select expression can be used as-is for executing a delete operation, or whether it must be pushed down into a subquery.

IsValidSelectExpressionForExecuteUpdate(SelectExpression, EntityShaperExpression, TableExpression)

Validates if the current select expression can be used for execute update operation or it requires to be joined as a subquery.

IsValidSelectExpressionForExecuteUpdate(SelectExpression, TableExpressionBase, TableExpression)

Validates if the current select expression can be used for execute update operation or it requires to be joined as a subquery.

MarkShaperNullable(Expression)

Marks the entity shaper in the given shaper expression as nullable.

(Inherited from QueryableMethodTranslatingExpressionVisitor)
TransformJsonQueryToTable(JsonQueryExpression)

Invoked when LINQ operators are composed over a collection within a JSON document. Transforms the provided JsonQueryExpression - representing access to the collection - into a provider-specific means to expand the JSON array into a relational table/rowset (e.g. SQL Server OPENJSON).

Translate(Expression)

Translates an expression to an equivalent SQL representation.

Translate(Expression)

Translates an expression to an equivalent SQL representation.

(Inherited from QueryableMethodTranslatingExpressionVisitor)
TranslateAll(ShapedQueryExpression, LambdaExpression)

Translates All<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>) method over the given source.

TranslateAny(ShapedQueryExpression, LambdaExpression)

Translates Any<TSource>(IQueryable<TSource>) method and other overloads over the given source.

TranslateAverage(ShapedQueryExpression, LambdaExpression, Type)

Translates Average(IQueryable<Decimal>) method and other overloads over the given source.

TranslateCast(ShapedQueryExpression, Type)

Translates Cast<TResult>(IQueryable) method over the given source.

TranslateConcat(ShapedQueryExpression, ShapedQueryExpression)

Translates Concat<TSource>(IQueryable<TSource>, IEnumerable<TSource>) method over the given source.

TranslateContains(ShapedQueryExpression, Expression)

Translates Contains<TSource>(IQueryable<TSource>, TSource) method over the given source.

TranslateCount(ShapedQueryExpression, LambdaExpression)

Translates Count<TSource>(IQueryable<TSource>) method and other overloads over the given source.

TranslateDefaultIfEmpty(ShapedQueryExpression, Expression)

Translates DefaultIfEmpty<TSource>(IQueryable<TSource>) method and other overloads over the given source.

TranslateDistinct(ShapedQueryExpression)

Translates Distinct<TSource>(IQueryable<TSource>) method over the given source.

TranslateElementAtOrDefault(ShapedQueryExpression, Expression, Boolean)

Translates ElementAt<TSource>(IQueryable<TSource>, Int32) method or ElementAtOrDefault<TSource>(IQueryable<TSource>, Int32) over the given source.

TranslateExcept(ShapedQueryExpression, ShapedQueryExpression)

Translates Except<TSource>(IQueryable<TSource>, IEnumerable<TSource>) method over the given source.

TranslateExecuteDelete(ShapedQueryExpression)

Translates ExecuteDelete<TSource>(IQueryable<TSource>) method over the given source.

TranslateExecuteDelete(ShapedQueryExpression)

Translates ExecuteDelete<TSource>(IQueryable<TSource>) method over the given source.

(Inherited from QueryableMethodTranslatingExpressionVisitor)
TranslateExecuteUpdate(ShapedQueryExpression, LambdaExpression)

Translates ExecuteUpdate<TSource>(IQueryable<TSource>, Expression<Func<SetPropertyCalls<TSource>,SetPropertyCalls<TSource>>>) method over the given source.

TranslateExecuteUpdate(ShapedQueryExpression, LambdaExpression)

Translates ExecuteUpdate<TSource>(IQueryable<TSource>, Expression<Func<SetPropertyCalls<TSource>,SetPropertyCalls<TSource>>>) method over the given source.

(Inherited from QueryableMethodTranslatingExpressionVisitor)
TranslateExpression(Expression, Boolean)

Translates the given expression into equivalent SQL representation.

TranslateExpression(Expression)

Translates the given expression into equivalent SQL representation.

TranslateFirstOrDefault(ShapedQueryExpression, LambdaExpression, Type, Boolean)

Translates First<TSource>(IQueryable<TSource>) method or FirstOrDefault<TSource>(IQueryable<TSource>) and their other overloads over the given source.

TranslateGroupBy(ShapedQueryExpression, LambdaExpression, LambdaExpression, LambdaExpression)

Translates GroupBy<TSource,TKey>(IQueryable<TSource>, Expression<Func<TSource,TKey>>) method and other overloads over the given source.

TranslateGroupJoin(ShapedQueryExpression, ShapedQueryExpression, LambdaExpression, LambdaExpression, LambdaExpression)

Translates GroupJoin<TOuter,TInner,TKey,TResult>(IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter,TKey>>, Expression<Func<TInner,TKey>>, Expression<Func<TOuter,IEnumerable<TInner>,TResult>>) method over the given source.

TranslateInlineQueryRoot(InlineQueryRootExpression)

Translates an inline collection into a queryable SQL VALUES expression.

TranslateInlineQueryRoot(InlineQueryRootExpression)

Translates an InlineQueryRootExpression, which represents a queryable collection expressed inline within the query.

(Inherited from QueryableMethodTranslatingExpressionVisitor)
TranslateIntersect(ShapedQueryExpression, ShapedQueryExpression)

Translates Intersect<TSource>(IQueryable<TSource>, IEnumerable<TSource>) method over the given source.

TranslateJoin(ShapedQueryExpression, ShapedQueryExpression, LambdaExpression, LambdaExpression, LambdaExpression)

Translates Join<TOuter,TInner,TKey,TResult>(IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter,TKey>>, Expression<Func<TInner,TKey>>, Expression<Func<TOuter,TInner,TResult>>) method over the given source.

TranslateLambdaExpression(ShapedQueryExpression, LambdaExpression)

Translates the given lambda expression for the ShapedQueryExpression source into equivalent SQL representation.

TranslateLastOrDefault(ShapedQueryExpression, LambdaExpression, Type, Boolean)

Translates Last<TSource>(IQueryable<TSource>) method or LastOrDefault<TSource>(IQueryable<TSource>) and their other overloads over the given source.

TranslateLeftJoin(ShapedQueryExpression, ShapedQueryExpression, LambdaExpression, LambdaExpression, LambdaExpression)

Translates LeftJoin over the given source.

TranslateLongCount(ShapedQueryExpression, LambdaExpression)

Translates LongCount<TSource>(IQueryable<TSource>) method and other overloads over the given source.

TranslateMax(ShapedQueryExpression, LambdaExpression, Type)

Translates Max<TSource>(IQueryable<TSource>) method and other overloads over the given source.

TranslateMemberAccess(Expression, MemberIdentity)

Translates a member access. Used when a property on an entity type represents a collection on which queryable LINQ operators may be composed.

TranslateMemberAccess(Expression, MemberIdentity)

Translates a member access. Used when a property on an entity type represents a collection on which queryable LINQ operators may be composed.

(Inherited from QueryableMethodTranslatingExpressionVisitor)
TranslateMin(ShapedQueryExpression, LambdaExpression, Type)

Translates Min<TSource>(IQueryable<TSource>) method and other overloads over the given source.

TranslateOfType(ShapedQueryExpression, Type)

Translates OfType<TResult>(IQueryable) method over the given source.

TranslateOrderBy(ShapedQueryExpression, LambdaExpression, Boolean)

Translates OrderBy<TSource,TKey>(IQueryable<TSource>, Expression<Func<TSource,TKey>>) or OrderByDescending<TSource,TKey>(IQueryable<TSource>, Expression<Func<TSource,TKey>>) method over the given source.

TranslateParameterQueryRoot(ParameterQueryRootExpression)

Translates a ParameterQueryRootExpression, which represents a queryable collection referenced as a parameter within the query.

TranslateParameterQueryRoot(ParameterQueryRootExpression)

Translates a ParameterQueryRootExpression, which represents a queryable collection referenced as a parameter within the query.

(Inherited from QueryableMethodTranslatingExpressionVisitor)
TranslatePrimitiveCollection(SqlExpression, IProperty, String)

Translates a parameter or column collection of primitive values. Providers can override this to translate e.g. int[] columns or parameters to a queryable table (OPENJSON on SQL Server, unnest on PostgreSQL...). The default implementation always returns null (no translation).

TranslateResultSelectorForJoin(ShapedQueryExpression, LambdaExpression, Expression, Type)
Obsolete.

Translates the result selector for join operation.

(Inherited from QueryableMethodTranslatingExpressionVisitor)
TranslateReverse(ShapedQueryExpression)

Translates Reverse<TSource>(IQueryable<TSource>) method over the given source.

TranslateSelect(ShapedQueryExpression, LambdaExpression)

Translates Select<TSource,TResult>(IQueryable<TSource>, Expression<Func<TSource,TResult>>) method over the given source.

TranslateSelectMany(ShapedQueryExpression, LambdaExpression, LambdaExpression)

Translates SelectMany<TSource,TCollection,TResult>(IQueryable<TSource>, Expression<Func<TSource, IEnumerable<TCollection>>>, Expression<Func<TSource,TCollection, TResult>>) method over the given source.

TranslateSelectMany(ShapedQueryExpression, LambdaExpression)

Translates SelectMany<TSource,TResult>(IQueryable<TSource>, Expression<Func<TSource,IEnumerable<TResult>>>) method over the given source.

TranslateSingleOrDefault(ShapedQueryExpression, LambdaExpression, Type, Boolean)

Translates Single<TSource>(IQueryable<TSource>) method or SingleOrDefault<TSource>(IQueryable<TSource>) and their other overloads over the given source.

TranslateSkip(ShapedQueryExpression, Expression)

Translates Skip<TSource>(IQueryable<TSource>, Int32) method over the given source.

TranslateSkipWhile(ShapedQueryExpression, LambdaExpression)

Translates SkipWhile<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>) method over the given source.

TranslateSubquery(Expression)

Translates the given subquery.

(Inherited from QueryableMethodTranslatingExpressionVisitor)
TranslateSum(ShapedQueryExpression, LambdaExpression, Type)

Translates Sum(IQueryable<Decimal>) method and other overloads over the given source.

TranslateTake(ShapedQueryExpression, Expression)

Translates Take<TSource>(IQueryable<TSource>, Int32) method over the given source.

TranslateTakeWhile(ShapedQueryExpression, LambdaExpression)

Translates TakeWhile<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>) method over the given source.

TranslateThenBy(ShapedQueryExpression, LambdaExpression, Boolean)

Translates ThenBy<TSource,TKey>(IOrderedQueryable<TSource>, Expression<Func<TSource,TKey>>) or ThenByDescending<TSource,TKey>(IOrderedQueryable<TSource>, Expression<Func<TSource,TKey>>) method over the given source.

TranslateUnion(ShapedQueryExpression, ShapedQueryExpression)

Translates Union<TSource>(IQueryable<TSource>, IEnumerable<TSource>) method over the given source.

TranslateWhere(ShapedQueryExpression, LambdaExpression)

Translates Where<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>) method over the given source.

VisitConstant(ConstantExpression) (Inherited from QueryableMethodTranslatingExpressionVisitor)
VisitExtension(Expression)

Visits the children of the extension expression.

VisitExtension(Expression) (Inherited from QueryableMethodTranslatingExpressionVisitor)
VisitInlineQueryRoot(InlineQueryRootExpression)

Translates an inline collection into a queryable SQL VALUES expression.

VisitMethodCall(MethodCallExpression)

Visits the children of the MethodCallExpression.

VisitMethodCall(MethodCallExpression) (Inherited from QueryableMethodTranslatingExpressionVisitor)

Applies to