Table of Contents

Struct SqlAsyncQueryReaderExecutor

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

Represents an SqlAsyncQueryReader bound to a specific Sql statement.

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

Constructors

SqlAsyncQueryReaderExecutor(SqlAsyncQueryReader, string)

Represents an SqlAsyncQueryReader bound to a specific Sql statement.

public SqlAsyncQueryReaderExecutor(SqlAsyncQueryReader Reader, string Sql)

Parameters

Reader SqlAsyncQueryReader

Underlying query reader.

Sql string

Bound SQL statement.

Properties

Reader

Underlying query reader.

public SqlAsyncQueryReader Reader { get; init; }

Property Value

SqlAsyncQueryReader

Sql

Bound SQL statement.

public string Sql { get; init; }

Property Value

string

Methods

ExecuteAsync(IDbCommand, SqlQueryReaderOptions?, CancellationToken)

Asynchronously creates an IDataReader instance and reads a collection of rows, using the specified Sql statement.

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

Parameters

command IDbCommand

IDbCommand to read from.

options SqlQueryReaderOptions?

Query reader options.

cancellationToken CancellationToken

Optional CancellationToken.

Returns

ValueTask<SqlQueryResult>

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