firestoreodm-flutter icon indicating copy to clipboard operation
firestoreodm-flutter copied to clipboard

Feature request - Add batch API

Open liranzairi opened this issue 11 months ago • 0 comments

Just like we have the transaction API, it'll be useful to also have a batch API in the odm that works in a similar way, e.g:

// Today's transaction API:
await FirebaseFirestore.instance.runTransaction((transaction) async {
  collectionRef.doc('123').transactionUpdate(transaction, title: 'New Title');
});

// Suggested batch API:
final batch = FirebaseFirestore.instance.batch();
collectionRef.doc('123').batchUpdate(batch, title: 'New Title');
await batch.commit();

liranzairi avatar Mar 04 '24 16:03 liranzairi