Skip to content

Index-Free: Filter document queries by read time #2159

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

Merged

Conversation

schmidt-sebastian
Copy link
Contributor

This PR adds the ability to getAllDocumentsMatchingQuery() to skip documents older than a given update time. This allows us to only scan for documents that have been modified since the Query's Target Mapping has been persisted.

Port of firebase/firebase-android-sdk#617

@schmidt-sebastian schmidt-sebastian changed the title Mrschmidt/indexfree 4 Index-Free: Filter document queries by read time Sep 6, 2019
);
await cache.addEntries(
[doc('b/new', 2, DOC_DATA)],
/* readTime= */ version(1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reading versions that haven't been written yet! Impressive.

(I assume this is intentional, though I'm also not sure it's a valuable test. I can't immediately think of a bug that this test would catch that the previous one wouldn't).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this might have been more valuable on Android since I switched the implementation from updateTime to readTime. I'll keep it for consistency.

@schmidt-sebastian schmidt-sebastian merged commit 2fef555 into mrschmidt/indexfree-master Sep 6, 2019
@firebase firebase locked and limited conversation to collaborators Oct 8, 2019
@schmidt-sebastian schmidt-sebastian deleted the mrschmidt/indexfree-4 branch October 10, 2019 22:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants