다음을 통해 공유


QueryCompilationContext Class

Definition

The primary data structure representing the state/components used during query compilation.

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

public class QueryCompilationContext
type QueryCompilationContext = class
Public Class QueryCompilationContext
Inheritance
QueryCompilationContext
Derived

Remarks

See Implementation of database providers and extensions and How EF Core queries work for more information and examples.

Constructors

QueryCompilationContext(IModel, ILogger, IEntityQueryModelVisitorFactory, IRequiresMaterializationExpressionVisitorFactory, ILinqOperatorProvider, Type, Boolean)

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

QueryCompilationContext(QueryCompilationContextDependencies, Boolean, Boolean, IReadOnlySet<String>)

Creates a new instance of the QueryCompilationContext class.

QueryCompilationContext(QueryCompilationContextDependencies, Boolean)

Creates a new instance of the QueryCompilationContext class.

QueryCompilationContext(QueryCompilationContextDependencies, ILinqOperatorProvider, Boolean)

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

Fields

NotTranslatedExpression

Expression representing a not translated expression in query tree during translation phase.

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

QueryContextParameter

ParameterExpression representing QueryContext parameter in query expression.

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

QueryParameterPrefix

Prefix for all the query parameters generated during parameter extraction in query pipeline.

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

Properties

ContextOptions

The ContextOptions to use during query compilation.

ContextType

The CLR type of derived DbContext to use during query compilation.

Dependencies

Dependencies for this service.

IgnoreAutoIncludes

A value indicating whether eager loaded navigations are ignored in this query.

IgnoreQueryFilters

A value indicating whether query filters are ignored in this query.

IsAsync

A value indicating whether it is async query.

IsAsyncQuery

Get a value indicating whether query that is being processed is asynchronous.

IsBuffering

A value indicating whether the underlying server query needs to pre-buffer all data.

IsIncludeQuery

The query has at least one Include operation.

IsPrecompiling

Indicates whether the query is being precompiled.

IsQueryBufferRequired

Gets a value indicating whether this query requires a query buffer.

IsTracking
Obsolete.

A value indicating whether it is tracking query.

IsTrackingQuery

Gets a value indicating whether this is a tracking query.

LinqOperatorProvider

Gets the LINQ operator provider.

Logger

The query logger to use during query compilation.

Model

The model to use during query compilation.

NonNullableReferenceTypeParameters

Names of parameters which have non-nullable reference types.

ParametersToConstantize

Names of parameters on which Constant<T>(T) was used. Such parameters are later transformed into constants.

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

ParametersToNotConstantize

Names of parameters on which Parameter<T>(T) was used. Such parameters are later not transformed into constants even when parameterized collection constantization is configured as the default.

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

QueryAnnotations

Gets the query annotations.

QuerySourceMapping

Gets the query source mapping.

QueryTrackingBehavior

A value indicating QueryTrackingBehavior of the query.

SupportsPrecompiledQuery

A value indicating whether the provider supports precompiled query. Default value is false. Providers that do support this feature should opt-in by setting this value to true.

Tags

The set of tags applied to this query.

TrackQueryResults

Gets a value indicating the default configured tracking behavior.

Methods

AddAnnotations(IEnumerable<IQueryAnnotation>)

Adds query annotations to the existing list.

AddOrUpdateMapping(IQuerySource, Expression)

Adds or updates the expression mapped to a query source.

AddOrUpdateMapping(IQuerySource, IEntityType)

Gets the entity type mapped to the given query source

AddQuerySourceRequiringMaterialization(IQuerySource)

Add a query source to the set of query sources requiring materialization.

AddTag(String)

Adds a tag to Tags.

AddTrackableInclude(IQuerySource, IReadOnlyList<INavigation>)

Adds a trackable include.

CloneAnnotations(QuerySourceMapping, QueryModel)

Creates cloned annotations targeting a new QueryModel.

CreateQueryExecutor<TResult>(Expression)

Creates the query executor func which gives results for this query.

CreateQueryExecutorExpression<TResult>(Expression)

Creates the query executor func which gives results for this query.

CreateQueryModelVisitor()

Creates query model visitor.

CreateQueryModelVisitor(EntityQueryModelVisitor)

Creates query model visitor.

DetermineQueryBufferRequirement(QueryModel)

Determine if the query requires a query buffer.

FindEntityType(IQuerySource)

Gets the entity type mapped to the given query source

FindQuerySourcesRequiringMaterialization(EntityQueryModelVisitor, QueryModel)

Determines all query sources that require materialization.

GetTrackableIncludes(IQuerySource)

Gets all trackable includes for a given query source.

QuerySourceRequiresMaterialization(IQuerySource)

Determine whether or not a query source requires materialization.

RegisterCorrelatedSubqueryMetadata(MainFromClause, Boolean, INavigation, INavigation, IQuerySource)

Registers a mapping between correlated collection query models and metadata needed to process them.

RegisterRuntimeParameter(String, LambdaExpression)

Registers a runtime parameter that is being added at some point during the compilation phase. A lambda must be provided, which will extract the parameter's value from the QueryContext every time the query is executed.

TryGetCorrelatedSubqueryMetadata(MainFromClause, CorrelatedSubqueryMetadata)

Looks up a mapping between correlated collection query models and metadata needed to process them.

UpdateMapping(QuerySourceMapping)

Updates the query source mappings to the new query sources

Applies to