map method
override
Maps the given row returned by the database into the fitting data class.
Implementation
@override
ChatItemViewRow map(Map<String, dynamic> data, {String? tablePrefix}) {
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
return ChatItemViewRow(
chatId: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}chat_id'],
)!,
chatItemId: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}chat_item_id'],
)!,
);
}