map method
Maps the given row returned by the database into the fitting data class.
Implementation
@override
FootballPlayerData map(Map<String, dynamic> data, {String? tablePrefix}) {
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
return FootballPlayerData(
id: attachedDatabase.typeMapping.read(
DriftSqlType.int,
data['${effectivePrefix}id'],
)!,
fullName: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}full_name'],
)!,
birthday: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime,
data['${effectivePrefix}birthday'],
)!,
countryId: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}country_id'],
)!,
imagePath: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}image_path'],
),
description: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}description'],
),
);
}