Class InMemoryPreparedQueryCommand<TResult>
A prepared in-memory query: the compiled query together with the delegate that (re)creates its enumerator and a cache of the per-call resolver.
public sealed class InMemoryPreparedQueryCommand<TResult> : IPreparedQueryCommand<TResult>
Type Parameters
TResultThe projected element type.
- Inheritance
-
InMemoryPreparedQueryCommand<TResult>
- Implements
-
IPreparedQueryCommand<TResult>
- Inherited Members
- Extension Methods
Constructors
InMemoryPreparedQueryCommand(object, CreateEnumeratorDelegate<TResult>, QueryCommand<TResult>)
A prepared in-memory query: the compiled query together with the delegate that (re)creates its enumerator and a cache of the per-call resolver.
public InMemoryPreparedQueryCommand(object compiledQuery, CreateEnumeratorDelegate<TResult> createEnumerator, QueryCommand<TResult> queryCommand)
Parameters
compiledQueryobjectThe compiled in-memory query holding the resolved data, joins and sorting.
createEnumeratorCreateEnumeratorDelegate<TResult>Factory that creates a fresh enumerator over the compiled query.
queryCommandQueryCommand<TResult>The query definition being executed.
Fields
Data
The resolved source data for the current execution, if any.
public object? Data
Field Value
Resolver
Cached per-call resolver: re-initialises the (already compiled) enumerator with new parameter values, skipping the per-call data resolution / joins / sorting checks. Built on first use.
public Func<object[]?, IAsyncEnumerator<TResult>>? Resolver
Field Value
- Func<object[], IAsyncEnumerator<TResult>>
Properties
CompiledQuery
Gets or sets the compiled in-memory query, which holds the resolved data, joins and sorting.
public object CompiledQuery { get; set; }
Property Value
CreateEnumerator
Gets the factory that creates a fresh enumerator over the compiled query.
public CreateEnumeratorDelegate<TResult> CreateEnumerator { get; }
Property Value
- CreateEnumeratorDelegate<TResult>
QueryCommand
Gets the query definition this prepared command executes.
public QueryCommand<TResult> QueryCommand { get; }
Property Value
- QueryCommand<TResult>