Table of Contents

Struct SqlAsyncParameterizedQueryReaderExecutor<TParameter, TRow>

Namespace
LfrlAnvil.Sql.Statements
Assembly
LfrlAnvil.Sql.Core.dll
public readonly record struct SqlAsyncParameterizedQueryReaderExecutor<TParameter, TRow> : IEquatable<SqlAsyncParameterizedQueryReaderExecutor<TParameter, TRow>> where TParameter : notnull where TRow : notnull

Type Parameters

TParameter

Parameter source type.

TRow

Row type.

Implements
Inherited Members

Constructors

SqlAsyncParameterizedQueryReaderExecutor(SqlParameterBinder<TParameter>, SqlAsyncQueryReaderExecutor<TRow>)

public SqlAsyncParameterizedQueryReaderExecutor(SqlParameterBinder<TParameter> ParameterBinder, SqlAsyncQueryReaderExecutor<TRow> Reader)

Parameters

ParameterBinder SqlParameterBinder<TParameter>

Underlying parameter binder.

Reader SqlAsyncQueryReaderExecutor<TRow>

Underlying query reader.

Properties

ParameterBinder

Underlying parameter binder.

public SqlParameterBinder<TParameter> ParameterBinder { get; init; }

Property Value

SqlParameterBinder<TParameter>

Reader

Underlying query reader.

public SqlAsyncQueryReaderExecutor<TRow> Reader { get; init; }

Property Value

SqlAsyncQueryReaderExecutor<TRow>

Methods

ExecuteAsync(IDbCommand, TParameter?, SqlQueryReaderOptions?, CancellationToken)

Asynchronously creates an IDataReader instance and reads a collection of rows, using the given parameters.

[Pure]
public ValueTask<SqlQueryResult<TRow>> ExecuteAsync(IDbCommand command, TParameter? parameters, SqlQueryReaderOptions? options = null, CancellationToken cancellationToken = default)

Parameters

command IDbCommand

IDbCommand to read from.

parameters TParameter

Source of parameters to bind.

options SqlQueryReaderOptions?

Query reader options.

cancellationToken CancellationToken

Optional CancellationToken.

Returns

ValueTask<SqlQueryResult<TRow>>

ValueTask<TResult> that returns a collection of read rows.