map method
override
Maps the given row returned by the database into the fitting data class.
Implementation
@override
BlocklistRow map(Map<String, dynamic> data, {String? tablePrefix}) {
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
return BlocklistRow(
userId: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}user_id'],
)!,
reason: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}reason'],
),
at: $BlocklistTable.$converterat.fromSql(
attachedDatabase.typeMapping.read(
DriftSqlType.int,
data['${effectivePrefix}at'],
)!,
),
cursor: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}cursor'],
),
);
}