Table of Contents

Struct SqlParameterizedQueryReaderExecutor<TParameter, TRow>

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

Represents an SqlQueryReaderExecutor<TRow> bound to an SqlParameterBinder<TSource> instance.

public readonly record struct SqlParameterizedQueryReaderExecutor<TParameter, TRow> : IEquatable<SqlParameterizedQueryReaderExecutor<TParameter, TRow>> where TParameter : notnull where TRow : notnull

Type Parameters

TParameter

Parameter source type.

TRow

Row type.

Implements
Inherited Members

Constructors

SqlParameterizedQueryReaderExecutor(SqlParameterBinder<TParameter>, SqlQueryReaderExecutor<TRow>)

Represents an SqlQueryReaderExecutor<TRow> bound to an SqlParameterBinder<TSource> instance.

public SqlParameterizedQueryReaderExecutor(SqlParameterBinder<TParameter> ParameterBinder, SqlQueryReaderExecutor<TRow> Reader)

Parameters

ParameterBinder SqlParameterBinder<TParameter>

Underlying parameter binder.

Reader SqlQueryReaderExecutor<TRow>

Underlying query reader.

Properties

ParameterBinder

Underlying parameter binder.

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

Property Value

SqlParameterBinder<TParameter>

Reader

Underlying query reader.

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

Property Value

SqlQueryReaderExecutor<TRow>

Methods

Execute(IDbCommand, TParameter?, SqlQueryReaderOptions?)

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

[Pure]
public SqlQueryResult<TRow> Execute(IDbCommand command, TParameter? parameters, SqlQueryReaderOptions? options = null)

Parameters

command IDbCommand

IDbCommand to read from.

parameters TParameter

Source of parameters to bind.

options SqlQueryReaderOptions?

Query reader options.

Returns

SqlQueryResult<TRow>

Returns a collection of read rows.