Table of Contents

Class InMemoryPreparedQueryCommand<TResult>

Namespace
NextORM.Core
Assembly
nextorm.core.dll

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

TResult

The projected element type.

Inheritance
InMemoryPreparedQueryCommand<TResult>
Implements
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

compiledQuery object

The compiled in-memory query holding the resolved data, joins and sorting.

createEnumerator CreateEnumeratorDelegate<TResult>

Factory that creates a fresh enumerator over the compiled query.

queryCommand QueryCommand<TResult>

The query definition being executed.

Fields

Data

The resolved source data for the current execution, if any.

public object? Data

Field Value

object

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

object

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>