map method
Maps the given row returned by the database into the fitting data class.
Implementation
@override
LocationAuditData map(Map<String, dynamic> data, {String? tablePrefix}) {
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
return LocationAuditData(
id: attachedDatabase.typeMapping
.read(DriftSqlType.int, data['${effectivePrefix}id'])!,
createdAt: attachedDatabase.typeMapping
.read(DriftSqlType.dateTime, data['${effectivePrefix}created_at'])!,
lat: attachedDatabase.typeMapping
.read(DriftSqlType.double, data['${effectivePrefix}lat'])!,
long: attachedDatabase.typeMapping
.read(DriftSqlType.double, data['${effectivePrefix}long'])!,
altitude: attachedDatabase.typeMapping
.read(DriftSqlType.double, data['${effectivePrefix}altitude'])!,
speed: attachedDatabase.typeMapping
.read(DriftSqlType.double, data['${effectivePrefix}speed'])!,
accuracy: attachedDatabase.typeMapping
.read(DriftSqlType.double, data['${effectivePrefix}accuracy'])!,
distance: attachedDatabase.typeMapping
.read(DriftSqlType.double, data['${effectivePrefix}distance'])!,
);
}