QueryCompilationContext QueryCompilationContext Class

Definition

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

public class QueryCompilationContext
Public Class QueryCompilationContext
Inheritance
System.ObjectSystem.Object
QueryCompilationContextQueryCompilationContext

Constructors

QueryCompilationContext(IModel, ILogger, IEntityQueryModelVisitorFactory, IRequiresMaterializationExpressionVisitorFactory, ILinqOperatorProvider, Type, Boolean) 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.

public QueryCompilationContext(IModel model, ILogger logger, IEntityQueryModelVisitorFactory entityQueryModelVisitorFactory, IRequiresMaterializationExpressionVisitorFactory requiresMaterializationExpressionVisitorFactory, ILinqOperatorProvider linqOperatorProvider, Type contextType, bool trackQueryResults)
Public Sub New(model As IModel, logger As ILogger, entityQueryModelVisitorFactory As IEntityQueryModelVisitorFactory, requiresMaterializationExpressionVisitorFactory As IRequiresMaterializationExpressionVisitorFactory, linqOperatorProvider As ILinqOperatorProvider, contextType As Type, trackQueryResults As Boolean)
Parameters
model
IModel IModel
logger
ILogger ILogger
contextType
System.Type System.Type
trackQueryResults
System.Boolean System.Boolean

Properties

ContextType ContextType

Gets the type of the context./

public virtual Type ContextType { get; }
Public Overridable ReadOnly Property ContextType As Type
Value
System.Type System.Type

The type of the context.

IsIncludeQuery IsIncludeQuery

The query has at least one Include operation.

public virtual bool IsIncludeQuery { get; }
Public Overridable ReadOnly Property IsIncludeQuery As Boolean
Value
System.Boolean System.Boolean

IsQueryBufferRequired IsQueryBufferRequired

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

public virtual bool IsQueryBufferRequired { get; }
Public Overridable ReadOnly Property IsQueryBufferRequired As Boolean
Value
System.Boolean System.Boolean

true if this query requires a query buffer, false if not.

IsTrackingQuery IsTrackingQuery

Gets a value indicating whether this is a tracking query.

public virtual bool IsTrackingQuery { get; }
Public Overridable ReadOnly Property IsTrackingQuery As Boolean
Value
System.Boolean System.Boolean

true if this object is a tracking query, false if not.

LinqOperatorProvider LinqOperatorProvider

Gets the linq operator provider.

public virtual ILinqOperatorProvider LinqOperatorProvider { get; }
Public Overridable ReadOnly Property LinqOperatorProvider As ILinqOperatorProvider
Value
ILinqOperatorProvider ILinqOperatorProvider

The linq operator provider.

Logger Logger

Gets the logger.

public virtual ILogger Logger { get; }
Public Overridable ReadOnly Property Logger As ILogger
Value
ILogger ILogger

The logger.

Model Model

Gets the model.

public virtual IModel Model { get; }
Public Overridable ReadOnly Property Model As IModel
Value
IModel IModel

The model.

QueryAnnotations QueryAnnotations

Gets the query annotations./

public virtual IReadOnlyCollection<IQueryAnnotation> QueryAnnotations { get; set; }
Public Overridable Property QueryAnnotations As IReadOnlyCollection(Of IQueryAnnotation)
Value
System.Collections.Generic.IReadOnlyCollection<IQueryAnnotation> System.Collections.Generic.IReadOnlyCollection(Of IQueryAnnotation)

The query annotations.

QuerySourceMapping QuerySourceMapping

Gets the query source mapping.

public virtual QuerySourceMapping QuerySourceMapping { get; }
Public Overridable ReadOnly Property QuerySourceMapping As QuerySourceMapping
Value
QuerySourceMapping QuerySourceMapping

The query source mapping.

TrackQueryResults TrackQueryResults

Gets a value indicating the default configured tracking behavior.

public virtual bool TrackQueryResults { get; }
Public Overridable ReadOnly Property TrackQueryResults As Boolean
Value
System.Boolean System.Boolean

true if the default is to track query results, false if not.

Methods

AddOrUpdateMapping(IQuerySource, Expression) AddOrUpdateMapping(IQuerySource, Expression)

Adds or updates the expression mapped to a query source.

public virtual void AddOrUpdateMapping(IQuerySource querySource, Expression expression)
Public Overridable Sub AddOrUpdateMapping(querySource As IQuerySource, expression As Expression)
Parameters
querySource
IQuerySource IQuerySource

The query source.

expression
System.Linq.Expressions.Expression System.Linq.Expressions.Expression

The expression mapped to the query source.

AddTrackableInclude(IQuerySource, IReadOnlyList) AddTrackableInclude(IQuerySource, IReadOnlyList(Of INavigation))

Adds a trackable include.

public virtual void AddTrackableInclude(IQuerySource querySource, IReadOnlyList<INavigation> navigationPath)
Public Overridable Sub AddTrackableInclude(querySource As IQuerySource, navigationPath As IReadOnlyList(Of INavigation))
Parameters
querySource
IQuerySource IQuerySource

The query source.

navigationPath
System.Collections.Generic.IReadOnlyList<INavigation> System.Collections.Generic.IReadOnlyList(Of INavigation)

The included navigation path.

CreateQueryModelVisitor() CreateQueryModelVisitor()

Creates query model visitor.

public virtual EntityQueryModelVisitor CreateQueryModelVisitor()
Public Overridable Function CreateQueryModelVisitor As EntityQueryModelVisitor
Returns

The new query model visitor.

CreateQueryModelVisitor(EntityQueryModelVisitor) CreateQueryModelVisitor(EntityQueryModelVisitor)

Creates query model visitor.

public virtual EntityQueryModelVisitor CreateQueryModelVisitor(EntityQueryModelVisitor parentEntityQueryModelVisitor)
Public Overridable Function CreateQueryModelVisitor(parentEntityQueryModelVisitor As EntityQueryModelVisitor) As EntityQueryModelVisitor
Parameters
parentEntityQueryModelVisitor
EntityQueryModelVisitor EntityQueryModelVisitor

The parent entity query model visitor.

Returns

The new query model visitor.

DetermineQueryBufferRequirement(QueryModel) DetermineQueryBufferRequirement(QueryModel)

Determine if the query requires a query buffer.

public virtual void DetermineQueryBufferRequirement(QueryModel queryModel)
Public Overridable Sub DetermineQueryBufferRequirement(queryModel As QueryModel)
Parameters
queryModel
QueryModel QueryModel

The query model.

Equals(Object) Equals(Object)

Inherited from System.Object

Equals(Object, Object) Equals(Object, Object)

Inherited from System.Object

FindQuerySourcesRequiringMaterialization(EntityQueryModelVisitor, QueryModel) FindQuerySourcesRequiringMaterialization(EntityQueryModelVisitor, QueryModel)

Determines all query sources that require materialization.

public virtual void FindQuerySourcesRequiringMaterialization(EntityQueryModelVisitor queryModelVisitor, QueryModel queryModel)
Public Overridable Sub FindQuerySourcesRequiringMaterialization(queryModelVisitor As EntityQueryModelVisitor, queryModel As QueryModel)
Parameters
queryModelVisitor
EntityQueryModelVisitor EntityQueryModelVisitor

The query model visitor.

queryModel
QueryModel QueryModel

The query model.

GetHashCode() GetHashCode()

Inherited from System.Object

GetTrackableIncludes(IQuerySource) GetTrackableIncludes(IQuerySource)

Gets all trackable includes for a given query source.

public virtual IReadOnlyList<IReadOnlyList<INavigation>> GetTrackableIncludes(IQuerySource querySource)
Public Overridable Function GetTrackableIncludes(querySource As IQuerySource) As IReadOnlyList(Of IReadOnlyList(Of INavigation))
Parameters
querySource
IQuerySource IQuerySource

The query source.

Returns
System.Collections.Generic.IReadOnlyList<System.Collections.Generic.IReadOnlyList<INavigation>> System.Collections.Generic.IReadOnlyList(Of System.Collections.Generic.IReadOnlyList(Of INavigation))

The trackable includes.

GetType() GetType()

Inherited from System.Object

MemberwiseClone() MemberwiseClone()

Inherited from System.Object

QuerySourceRequiresMaterialization(IQuerySource) QuerySourceRequiresMaterialization(IQuerySource)

Determine whether or not a query source requires materialization.

public virtual bool QuerySourceRequiresMaterialization(IQuerySource querySource)
Public Overridable Function QuerySourceRequiresMaterialization(querySource As IQuerySource) As Boolean
Parameters
querySource
IQuerySource IQuerySource

The query source.

Returns
System.Boolean System.Boolean

true if it requires materialization, false if not.

ReferenceEquals(Object, Object) ReferenceEquals(Object, Object)

Inherited from System.Object

ToString() ToString()

Inherited from System.Object