Row

A struct to represent a single row of a result set.

The row struct is used for both 'traditional' and 'prepared' result sets. It consists of parallel arrays of Variant and bool, with the bool array indicating which of the result set columns are NULL.

I have been agitating for some kind of null indicator that can be set for a Variant without destroying its inherent type information. If this were the case, then the bool array could disappear.

Constructors

this
this(Connection con, ubyte[] packet, ResultSetHeaders rh, bool binary)

A constructor to extract the column data from a row data packet.

Members

Aliases

opDollar
alias opDollar = length

Get the number of elements (columns) in this row.

Functions

isNull
bool isNull(size_t i)

Check if a column in the result row was NULL

opIndex
inout(Variant) opIndex(size_t i)

Simplify retrieval of a column value by index.

show
void show()
Undocumented in source. Be warned that the author may not have intended to support it.
toStruct
void toStruct(S s)

Move the content of the row into a compatible struct

Properties

length
size_t length [@property getter]

Get the number of elements (columns) in this row.

Variables

_values
Variant[] _values;
Undocumented in source.

Meta