createBatch method

BatchService createBatch()

Creates a new batch handler for sending multiple transactional create/update/upsert/delete collection requests in one network call.

Example:

final batch = await pb.createBatch();

batch.collection('example1').create(body: { ... });
batch.collection('example2').update('RECORD_ID', body: { ... });
batch.collection('example3').delete('RECORD_ID');
batch.collection('example4').upsert(body: { ... });

await batch.send();

Implementation

BatchService createBatch() {
  return BatchService(this);
}