Table of Contents

Struct SqlAsyncParameterizedQueryReaderExecutor

Namespace
LfrlAnvil.Sql.Statements
Assembly
LfrlAnvil.Sql.Core.dll

Represents an SqlAsyncQueryReaderExecutor bound to an SqlParameterBinder instance.

public readonly record struct SqlAsyncParameterizedQueryReaderExecutor : IEquatable<SqlAsyncParameterizedQueryReaderExecutor>
Implements
Inherited Members

Constructors

SqlAsyncParameterizedQueryReaderExecutor(SqlParameterBinder, SqlAsyncQueryReaderExecutor)

Represents an SqlAsyncQueryReaderExecutor bound to an SqlParameterBinder instance.

public SqlAsyncParameterizedQueryReaderExecutor(SqlParameterBinder ParameterBinder, SqlAsyncQueryReaderExecutor Reader)

Parameters

ParameterBinder SqlParameterBinder

Underlying parameter binder.

Reader SqlAsyncQueryReaderExecutor

Underlying query reader.

Properties

ParameterBinder

Underlying parameter binder.

public SqlParameterBinder ParameterBinder { get; init; }

Property Value

SqlParameterBinder

Reader

Underlying query reader.

public SqlAsyncQueryReaderExecutor Reader { get; init; }

Property Value

SqlAsyncQueryReaderExecutor

Methods

ExecuteAsync(IDbCommand, IEnumerable<SqlParameter>?, SqlQueryReaderOptions?, CancellationToken)

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

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

Parameters

command IDbCommand

IDbCommand to read from.

parameters IEnumerable<SqlParameter>

Source of parameters to bind.

options SqlQueryReaderOptions?

Query reader options.

cancellationToken CancellationToken

Optional CancellationToken.

Returns

ValueTask<SqlQueryResult>

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