map method
override
Maps the given row returned by the database into the fitting data class.
Implementation
@override
ChatItemRow map(Map<String, dynamic> data, {String? tablePrefix}) {
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
return ChatItemRow(
id: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}id'])!,
chatId: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}chat_id'])!,
authorId: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}author_id'])!,
at: $ChatItemsTable.$converterat.fromSql(attachedDatabase.typeMapping
.read(DriftSqlType.int, data['${effectivePrefix}at'])!),
status: $ChatItemsTable.$converterstatus.fromSql(attachedDatabase
.typeMapping
.read(DriftSqlType.int, data['${effectivePrefix}status'])!),
data: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}data'])!,
cursor: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}cursor']),
ver: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}ver'])!,
);
}