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