map method
Maps the given row returned by the database into the fitting data class.
Implementation
@override
PendingOp map(Map<String, dynamic> data, {String? tablePrefix}) {
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
return PendingOp(
opId: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}op_id'],
)!,
scopeName: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}scope_name'],
)!,
scopeKeys: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}scope_keys'],
)!,
type: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}type'],
)!,
id: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}id'],
)!,
payload: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}payload'],
),
updatedAt: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}updated_at'],
)!,
);
}