map method
Maps the given row returned by the database into the fitting data class.
Implementation
@override
StoredActionStep map(Map<String, dynamic> data, {String? tablePrefix}) {
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
return StoredActionStep(
actionId: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}action_id'],
)!,
name: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}name'],
)!,
status: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}status'],
)!,
resultJson: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}result_json'],
),
lastError: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}last_error'],
),
updatedAt: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime,
data['${effectivePrefix}updated_at'],
)!,
);
}