diff options
author | Gil <mcg@google.com> | 2018-07-09 10:03:27 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-09 10:03:27 -0700 |
commit | a5eb8952f8eadf1f59de1b0e7e9b91d497664fa7 (patch) | |
tree | 80505efb0cc36e2bc3a226fa03584a912167f84e /Firestore/Source/Local/FSTMutationQueue.h | |
parent | 4c9df5a6661e12d6b3d11f69746ff256f0526653 (diff) |
Add allMutationsAffectingDocumentKeys to FSTMutationQueue (#1479)
* Pod updates for Cocapods 1.5.3
* Add allMutationsAffectingDocumentKeys
Diffstat (limited to 'Firestore/Source/Local/FSTMutationQueue.h')
-rw-r--r-- | Firestore/Source/Local/FSTMutationQueue.h | 14 |
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. |