QueryResultAccess extension

Low-risk typed accessors for QueryResult row/column navigation.

These helpers do not change the underlying List<dynamic> storage; they only reduce boilerplate when reading scalar values from small result sets.

on

Properties

firstRowOrNull Map<String, Object?>?

Available on QueryResult, provided by the QueryResultAccess extension

First row as a map, or null when isEmpty.
no setter
rowsAsMaps List<Map<String, Object?>>

Available on QueryResult, provided by the QueryResultAccess extension

All rows as name → value maps aligned with columns.
no setter

Methods

cell(int row, String column, {bool ignoreCase = false}) Object?

Available on QueryResult, provided by the QueryResultAccess extension

Returns the value at row / column, or null when out of range.
cellAs<T>(int row, String column, {bool ignoreCase = false}) → T?

Available on QueryResult, provided by the QueryResultAccess extension

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?

Available on QueryResult, provided by the QueryResultAccess extension

Returns the zero-based index of column, or null when absent.
columnValues<T>(String column, {bool ignoreCase = false, bool includeNulls = true}) List<T?>

Available on QueryResult, provided by the QueryResultAccess extension

Returns all values for column as a typed list.
firstValue<T>(String column, {bool ignoreCase = false}) → T?

Available on QueryResult, provided by the QueryResultAccess extension

Returns the first row's value for column, or null when empty.
hasColumn(String column, {bool ignoreCase = false}) bool

Available on QueryResult, provided by the QueryResultAccess extension

Returns true when column exists in columns.
rowAsMap(int row) Map<String, Object?>

Available on QueryResult, provided by the QueryResultAccess extension

Returns row row as a name → value map aligned with columns.
scalar<T>(String column, {bool ignoreCase = false}) → T?

Available on QueryResult, provided by the QueryResultAccess extension

Single scalar from the first row for column, or null when empty or not assignable to T. Alias for firstValue.