map method
override
Maps the given row returned by the database into the fitting data class.
Implementation
@override
SyllabusSection map(Map<String, dynamic> data, {String? tablePrefix}) {
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
return SyllabusSection(
id: attachedDatabase.typeMapping.read(
DriftSqlType.int,
data['${effectivePrefix}id'],
)!,
syllabus: attachedDatabase.typeMapping.read(
DriftSqlType.int,
data['${effectivePrefix}syllabus'],
)!,
title: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}title'],
)!,
content: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}content'],
),
position: attachedDatabase.typeMapping.read(
DriftSqlType.int,
data['${effectivePrefix}position'],
)!,
);
}