map method
Maps the given row returned by the database into the fitting data class.
Implementation
@override
MessageDelivery map(Map<String, dynamic> data, {String? tablePrefix}) {
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
return MessageDelivery(
messageId: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}message_id'],
)!,
peerNodeId: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}peer_node_id'],
)!,
deliveredAt: attachedDatabase.typeMapping.read(
DriftSqlType.int,
data['${effectivePrefix}delivered_at'],
)!,
);
}