previewUpdateMany method
Returns the statement preview for updating items.
Example:
final dto = $UserUpdateDto(id: 1, email: 'newemail@example.com');
final preview = repository.previewUpdateMany([dto]);
Implementation
StatementPreview previewUpdateMany(
List<Object> inputs, {
Map<String, Object?>? where,
JsonUpdateBuilder<T>? jsonUpdates,
}) {
if (inputs.isEmpty) {
throw ArgumentError.value(
inputs,
'inputs',
'previewUpdateMany requires inputs',
);
}
final query = _requireQuery('previewUpdateMany');
final plan = query.previewUpdatePlan(
inputs,
where: where,
jsonUpdates: jsonUpdates,
);
return describeMutation(plan);
}