aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/Source/Local/FSTMutationQueue.h
diff options
context:
space:
mode:
Diffstat (limited to 'Firestore/Source/Local/FSTMutationQueue.h')
-rw-r--r--Firestore/Source/Local/FSTMutationQueue.h14
1 files changed, 13 insertions, 1 deletions
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,11 +116,22 @@ 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<FSTMutationBatch *> *)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<FSTMutationBatch *> *)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
* you'll need to check that the mutation itself matches the query.