map method

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