diff options
author | Gil <mcg@google.com> | 2018-02-01 07:55:49 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-01 07:55:49 -0800 |
commit | 515625c47fab947f82d7f8fc8daef885e56a7df6 (patch) | |
tree | 2a0eea9158134c3dbaf950953a86e2841e101bfc /Firestore/Source/Model | |
parent | ac3052223465ce654457fec17b34f27de1706e57 (diff) |
Remove predecessorKey,Object,Document, etc (#735)
This is dead code.
I think it was probably useful in the RTDB because of the way it notified of changes, but we give changes with indexes in Firestore so I think we don't need it.
Diffstat (limited to 'Firestore/Source/Model')
-rw-r--r-- | Firestore/Source/Model/FSTDocumentSet.h | 10 | ||||
-rw-r--r-- | Firestore/Source/Model/FSTDocumentSet.mm | 10 |
2 files changed, 0 insertions, 20 deletions
diff --git a/Firestore/Source/Model/FSTDocumentSet.h b/Firestore/Source/Model/FSTDocumentSet.h index a7f8c4a..022e900 100644 --- a/Firestore/Source/Model/FSTDocumentSet.h +++ b/Firestore/Source/Model/FSTDocumentSet.h @@ -59,16 +59,6 @@ NS_ASSUME_NONNULL_BEGIN - (FSTDocument *_Nullable)lastDocument; /** - * Returns the document previous to the document associated with the given key in the set according - * to its built in ordering. Returns nil if the document associated with the given key is the - * first document. - * - * @param key A key that must be present in the DocumentSet. - * @throws NSInvalidArgumentException if key is not present. - */ -- (FSTDocument *_Nullable)predecessorDocumentForKey:(FSTDocumentKey *)key; - -/** * Returns the index of the document with the provided key in the document set. Returns NSNotFound * if the key is not present. */ diff --git a/Firestore/Source/Model/FSTDocumentSet.mm b/Firestore/Source/Model/FSTDocumentSet.mm index c4c0f49..6f44799 100644 --- a/Firestore/Source/Model/FSTDocumentSet.mm +++ b/Firestore/Source/Model/FSTDocumentSet.mm @@ -135,16 +135,6 @@ typedef FSTImmutableSortedSet<FSTDocument *> SetType; return [self.sortedSet lastObject]; } -- (FSTDocument *_Nullable)predecessorDocumentForKey:(FSTDocumentKey *)key { - FSTDocument *doc = [self.index objectForKey:key]; - if (!doc) { - @throw [NSException exceptionWithName:NSInvalidArgumentException - reason:[NSString stringWithFormat:@"Key %@ does not exist", key] - userInfo:nil]; - } - return [self.sortedSet predecessorObject:doc]; -} - - (NSUInteger)indexOfKey:(FSTDocumentKey *)key { FSTDocument *doc = [self.index objectForKey:key]; return doc ? [self.sortedSet indexOfObject:doc] : NSNotFound; |