map method

  1. @override
CourseOfferingClassroom map(
  1. Map<String, dynamic> data, {
  2. String? tablePrefix,
})
override

Maps the given row returned by the database into the fitting data class.

Implementation

@override
CourseOfferingClassroom map(
  Map<String, dynamic> data, {
  String? tablePrefix,
}) {
  final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
  return CourseOfferingClassroom(
    courseOffering: attachedDatabase.typeMapping.read(
      DriftSqlType.int,
      data['${effectivePrefix}course_offering'],
    )!,
    classroom: attachedDatabase.typeMapping.read(
      DriftSqlType.int,
      data['${effectivePrefix}classroom'],
    )!,
  );
}