[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix startAfter/endBefore for orderByKeys queries #7403

Merged
merged 13 commits into from
Feb 10, 2021
Prev Previous commit
Next Next commit
Complete event snap
  • Loading branch information
jmwski committed Feb 3, 2021
commit 92ffff6f22add7bd5e1d691a2ec2125a7f9c01df
2 changes: 1 addition & 1 deletion FirebaseDatabase/Sources/Core/FSyncTree.m
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ - (FIndexedNode *)persistenceServerCache:(FQuerySpec *)querySpec {
getView:query
writesCache:[_pendingWriteTree childWritesForPath:[query path]]
serverCache:serverCache];
return [view serverCache];
return [view completeEventCache];
}
return nil;
}
Expand Down
1 change: 1 addition & 0 deletions FirebaseDatabase/Sources/Core/View/FView.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@

- (id<FNode>)eventCache;
- (id<FNode>)serverCache;
- (id<FNode>)completeEventCache;
- (id<FNode>)completeServerCacheFor:(FPath *)path;
- (BOOL)isEmpty;

Expand Down
4 changes: 4 additions & 0 deletions FirebaseDatabase/Sources/Core/View/FView.m
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ - (id)initWithQuery:(FQuerySpec *)query
return self.viewCache.cachedEventSnap.node;
}

- (id<FNode>)completeEventCache {
return self.viewCache.completeEventSnap;
}

- (id<FNode>)completeServerCacheFor:(FPath *)path {
id<FNode> cache = self.viewCache.completeServerSnap;
if (cache) {
Expand Down