map method

  1. @override
LockRow 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
LockRow map(Map<String, dynamic> data, {String? tablePrefix}) {
  final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
  return LockRow(
    operation: attachedDatabase.typeMapping
        .read(DriftSqlType.string, data['${effectivePrefix}operation'])!,
    holder: attachedDatabase.typeMapping
        .read(DriftSqlType.string, data['${effectivePrefix}holder'])!,
    lockedAt: $LocksTable.$converterlockedAtn.fromSql(attachedDatabase
        .typeMapping
        .read(DriftSqlType.int, data['${effectivePrefix}locked_at'])),
  );
}