map method

  1. @override
CacheSummaryRow 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
CacheSummaryRow map(Map<String, dynamic> data, {String? tablePrefix}) {
  final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
  return CacheSummaryRow(
    id: attachedDatabase.typeMapping.read(
      DriftSqlType.int,
      data['${effectivePrefix}id'],
    )!,
    size: attachedDatabase.typeMapping.read(
      DriftSqlType.int,
      data['${effectivePrefix}size'],
    )!,
    modified: $CacheSummaryTable.$convertermodifiedn.fromSql(
      attachedDatabase.typeMapping.read(
        DriftSqlType.int,
        data['${effectivePrefix}modified'],
      ),
    ),
    maxSize: attachedDatabase.typeMapping.read(
      DriftSqlType.int,
      data['${effectivePrefix}max_size'],
    ),
  );
}