From a5eb8952f8eadf1f59de1b0e7e9b91d497664fa7 Mon Sep 17 00:00:00 2001 From: Gil Date: Mon, 9 Jul 2018 10:03:27 -0700 Subject: Add allMutationsAffectingDocumentKeys to FSTMutationQueue (#1479) * Pod updates for Cocapods 1.5.3 * Add allMutationsAffectingDocumentKeys --- Firestore/Source/Local/FSTMutationQueue.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'Firestore/Source/Local/FSTMutationQueue.h') diff --git a/Firestore/Source/Local/FSTMutationQueue.h b/Firestore/Source/Local/FSTMutationQueue.h index 89b1a52..7d117b5 100644 --- a/Firestore/Source/Local/FSTMutationQueue.h +++ b/Firestore/Source/Local/FSTMutationQueue.h @@ -20,6 +20,7 @@ #import "Firestore/Source/Local/FSTGarbageCollector.h" #include "Firestore/core/src/firebase/firestore/model/document_key.h" +#include "Firestore/core/src/firebase/firestore/model/document_key_set.h" @class FSTMutation; @class FSTMutationBatch; @@ -115,10 +116,21 @@ NS_ASSUME_NONNULL_BEGIN * don't contain the document key at all if it's convenient. */ // TODO(mcg): This should really return an NSEnumerator -// also for b/32992024, all backing stores should really index by document key - (NSArray *)allMutationBatchesAffectingDocumentKey: (const firebase::firestore::model::DocumentKey &)documentKey; +/** + * Finds all mutation batches that could @em possibly affect the given document keys. Not all + * mutations in a batch will necessarily affect each key, so when looping through the batches you'll + * need to check that the mutation itself matches the key. + * + * Note that because of this requirement implementations are free to return mutation batches that + * don't contain any of the given document keys at all if it's convenient. + */ +// TODO(mcg): This should really return an NSEnumerator +- (NSArray *)allMutationBatchesAffectingDocumentKeys: + (const firebase::firestore::model::DocumentKeySet &)documentKeys; + /** * Finds all mutation batches that could affect the results for the given query. Not all * mutations in a batch will necessarily affect the query, so when looping through the batch -- cgit v1.2.3