Struct SqlQueryResult
- Namespace
- LfrlAnvil.Sql.Statements
- Assembly
- LfrlAnvil.Sql.Core.dll
Represents a type-erased query reader result.
public readonly struct SqlQueryResult
- Inherited Members
Constructors
SqlQueryResult(SqlResultSetField[], List<object?>)
Creates a new SqlQueryResult instance.
public SqlQueryResult(SqlResultSetField[] resultSetFields, List<object?> cells)
Parameters
resultSetFields
SqlResultSetField[]Collection of definitions of associated fields.
cells
List<object>1-dimensional collection of all field values for all rows.
Exceptions
- ArgumentOutOfRangeException
When
resultSetFields
is empty.- ArgumentException
When number of
cells
is not a multiple of the number ofresultSetFields
.
Fields
Empty
Represents a result without any Rows.
public static readonly SqlQueryResult Empty
Field Value
Properties
IsEmpty
Specifies whether or not this result contains any Rows.
public bool IsEmpty { get; }
Property Value
ResultSetFields
Collection of definitions of associated fields.
public ReadOnlySpan<SqlResultSetField> ResultSetFields { get; }
Property Value
Rows
Collection of read rows.
public SqlQueryReaderRowCollection? Rows { get; }