Struct ResultSet

A random access range of Row.

This is being considered for deprecation in a future release of mysql-native, because the same thing can be achieved by passing a ResultRange to std.array.array().

This is returned by the mysql.commands.querySet and mysql.prepared.PreparedImpl.querySet functions.

Unlike ResultRange, this offers random access to the individual rows via array-like indexing and a length member to check the number of rows received without having to count them.

However, this random access comes with a downside: Unlike ResultRange, using ResultSet means ALL the rows are downloaded and stored in memory before you can access any of them. So use this only if you really need random-access and you're not likely to be dealing with large numbers of rows. Otherwise, consider using query to receive a ResultRange instead.

Properties

Name Type Description
back [get] inout(Row) Make the ResultSet behave as a random access range - back
colNameIndicies [get] const(ulong[string]) An AA to lookup a column's index by name
colNames [get] const(string)[] Get the names of all the columns
empty [get] bool Make the ResultSet behave as a random access range - empty
front [get] inout(Row) Make the ResultSet behave as a random access range - front
length [get] ulong Make the ResultSet behave as a random access range - length
save [get] ResultSet Make the ResultSet behave as a random access range - save

Methods

Name Description
asAA Get a row as an associative array by column name
opIndex Make the ResultSet behave as a random access range - opIndex
popBack Make the ResultSet behave as a random access range - popBack
popFront Make the ResultSet behave as a random access range - popFront()
revert Restore the range to its original span.

Aliases

Name Description
opDollar Make the ResultSet behave as a random access range - length

Authors

Copyright

License