map method

  1. @override
UserSemesterSummaryCadreRole 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
UserSemesterSummaryCadreRole map(
  Map<String, dynamic> data, {
  String? tablePrefix,
}) {
  final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
  return UserSemesterSummaryCadreRole(
    id: attachedDatabase.typeMapping.read(
      DriftSqlType.int,
      data['${effectivePrefix}id'],
    )!,
    summary: attachedDatabase.typeMapping.read(
      DriftSqlType.int,
      data['${effectivePrefix}summary'],
    )!,
    role: attachedDatabase.typeMapping.read(
      DriftSqlType.string,
      data['${effectivePrefix}role'],
    )!,
  );
}