QueryResultReader class

Indexed access over live rows and a snapshot of the result's column names.

Constructors

QueryResultReader(QueryResult result)

Properties

columns → List<String>
final
firstRowOrNull → Map<String, Object?>?
First row as a map, or null when isEmpty.
no setter
hashCode → int
The hash code for this object.
no setterinherited
isEmpty → bool
no setter
rows → List<List>
no setter
rowsAsMaps → List<Map<String, Object?>>
All rows as name → value maps aligned with columns.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

cell(int row, String column, {bool ignoreCase = false}) → Object?
Returns the value at row / column, or null when out of range.
cellAs<T>(int row, String column, {bool ignoreCase = false}) → T?
Returns the value at row / column cast to T, or null when absent or not assignable to T.
columnIndex(String column, {bool ignoreCase = false}) → int?
Returns the zero-based index of column, or null when absent.
columnValues<T>(String column, {bool ignoreCase = false, bool includeNulls = true}) → List<T?>
Returns all values for column as a typed list.
firstValue<T>(String column, {bool ignoreCase = false}) → T?
Returns the first row's value for column, or null when empty.
hasColumn(String column, {bool ignoreCase = false}) → bool
Returns true when column exists in columns.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
rowAsMap(int row) → Map<String, Object?>
Returns row row as a name → value map aligned with columns.
scalar<T>(String column, {bool ignoreCase = false}) → T?
Single scalar from the first row for column, or null when empty or not assignable to T. Alias for firstValue.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited