ResultSetStructure class final

The expected column structure of a result set.

This contains positions for expressions as well as the list of positions for each table added to the result set in tables.

This information is used when mapping values to Dart. A table would look itself up in tables to obtain indices of its columns in each row. These positions are then used when each row is mapped to Dart, avoiding the duplicate map lookup.

Properties

expressions → Map<Expression<Object>, ColumnPosition>
All expressions added as columns to this result set structure.
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
tables → Map<ResultSet<Object, ResultSet<Object, dynamic>>, List<ColumnPosition>>
For each ResultSet that has been added to a query in its entirety, the a list of column indices for each column in the result set.
final

Methods

addColumn(Expression<Object> expression) → void
Adds a column to this query.
addColumns(Iterable<Expression<Object>> columns) → void
Adds multiple columns to this query.
addResultSet(ResultSet<Object, ResultSet<Object, dynamic>> resultSet) → void
Adds all columns from ResultSet to this ResultSetStructure.
createMapperToDriftRow(DriftDialect dialect) → DriftRow Function(RawRow)
Creates a function that, given a RawRow, extracts the DriftRow for expressions.
createNameForColumn(ColumnPosition position) → String
Creates a name for a given column position that can later be queried with nameForColumn.
nameForColumn(ColumnPosition position) → String?
If an explicit name has been set for the given column position, returns it.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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