previewUpdateMany method

StatementPreview previewUpdateMany(
  1. List<Object> inputs, {
  2. Map<String, Object?>? where,
  3. JsonUpdateBuilder<T>? jsonUpdates,
})

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);
}