Table of Contents

Struct SqlScalarQueryReaderExecutor

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

Represents an SqlScalarQueryReader bound to a specific Sql statement.

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

Constructors

SqlScalarQueryReaderExecutor(SqlScalarQueryReader, string)

Represents an SqlScalarQueryReader bound to a specific Sql statement.

public SqlScalarQueryReaderExecutor(SqlScalarQueryReader Reader, string Sql)

Parameters

Reader SqlScalarQueryReader

Underlying query reader.

Sql string

Bound SQL statement.

Properties

Reader

Underlying query reader.

public SqlScalarQueryReader Reader { get; init; }

Property Value

SqlScalarQueryReader

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 Execute(IDbCommand command)

Parameters

command IDbCommand

IDbCommand to read from.

Returns

SqlScalarQueryResult

Returns a read scalar value.