MultiTypedResultKey<$Table extends Table, $Dataclass> class

This class is used to convert a table which expects a single dataclass per row into a table that can contain a multiple dataclasses per row. However when we prefetch multiple references, we need to store them in a list, which isn't supported by the referenced table class. For single references, we use original referenced table as a key in the TypedResult._parsedData object. This class is implemented by the code generator and should not be instantiated or extended manually.

Implemented types

Properties

$columns List<GeneratedColumn<Object>>
All columns from this table or view.
final
aliasedName String
The (potentially aliased) name of this table or view.
final
asDslTable → $Table
Type system sugar. Implementations are likely to inherit from both TableInfo and Tbl and can thus just return their instance.
final
attachedDatabase DatabaseConnectionUser
The generated database instance that this view or table is attached to.
final
columnsByName Map<String, GeneratedColumn<Object>>
Gets all $columns in this table or view, indexed by their (non-escaped) name.
final
entityName String
The (unalised) name of this entity in the database.
final
hashCode int
Only use the entity name as the hashcode
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createAlias(String alias) MultiTypedResultKey<$Table, $Dataclass>
Creates an alias of this table or view that will write the name alias when used in a query.
override
map(Map<String, dynamic> data, {String? tablePrefix}) FutureOr<$Dataclass>
Maps the given row returned by the database into the fitting data class.
override
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.
override

Static Methods

fromTable<$Table extends Table, $Dataclass>(TableInfo<$Table, $Dataclass> table, {required String aliasName}) MultiTypedResultKey<$Table, List<$Dataclass>>
Create a MultiTypedResultKey from a table