Table of Contents

Struct SqlScalarQueryReaderExecutor<T>

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

Represents an SqlScalarQueryReader<T> bound to a specific Sql statement.

public readonly record struct SqlScalarQueryReaderExecutor<T> : IEquatable<SqlScalarQueryReaderExecutor<T>>

Type Parameters

T

Value type.

Implements
Inherited Members

Constructors

SqlScalarQueryReaderExecutor(SqlScalarQueryReader<T>, string)

Represents an SqlScalarQueryReader<T> bound to a specific Sql statement.

public SqlScalarQueryReaderExecutor(SqlScalarQueryReader<T> Reader, string Sql)

Parameters

Reader SqlScalarQueryReader<T>

Underlying query reader.

Sql string

Bound SQL statement.

Properties

Reader

Underlying query reader.

public SqlScalarQueryReader<T> Reader { get; init; }

Property Value

SqlScalarQueryReader<T>

Sql

Bound SQL statement.

public string Sql { get; init; }

Property Value

string

Methods

Execute(IDbCommand)

Creates an IDataReader instance and reads a scalar value, using the specified Sql statement.

[Pure]
public SqlScalarQueryResult<T> Execute(IDbCommand command)

Parameters

command IDbCommand

IDbCommand to read from.

Returns

SqlScalarQueryResult<T>

Returns a read scalar value.