bulkUpdate method

  1. @override
Future<int?> bulkUpdate(
  1. String whereClause,
  2. E changes
)
override

This API updates multiple objects in a data table with a single request. Returns the number object of objects updated as a result of the request.

Implementation

@override
Future<int?> bulkUpdate(String whereClause, E changes) async {
  String methodName = '/data/bulk/$tableName';
  Map? mapChanges = reflector.serialize(changes);

  if (whereClause.isNotEmpty) {
    methodName += '?where=$whereClause';
  }

  return await Invoker.put(methodName, mapChanges);
}