firestoreodm-flutter
firestoreodm-flutter copied to clipboard
Feature request - Add batch API
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();