map method
override
Maps the given row returned by the database into the fitting data class.
Implementation
@override
MapBuildingRecord map(Map<String, dynamic> data, {String? tablePrefix}) {
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
return MapBuildingRecord(
code: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}code'],
)!,
name: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}name'],
)!,
geometry: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}geometry'],
)!,
);
}