map method
override
Maps the given row returned by the database into the fitting data class.
Implementation
@override
Syllabus map(Map<String, dynamic> data, {String? tablePrefix}) {
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
return Syllabus(
id: attachedDatabase.typeMapping.read(
DriftSqlType.int,
data['${effectivePrefix}id'],
)!,
courseOffering: attachedDatabase.typeMapping.read(
DriftSqlType.int,
data['${effectivePrefix}course_offering'],
)!,
teacher: attachedDatabase.typeMapping.read(
DriftSqlType.int,
data['${effectivePrefix}teacher'],
)!,
language: $SyllabusesTable.$converterlanguage.fromSql(
attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}language'],
)!,
),
updatedAt: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime,
data['${effectivePrefix}updated_at'],
),
fetchedAt: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime,
data['${effectivePrefix}fetched_at'],
)!,
);
}