-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Use a prefix scan when fetching documents matching a query. #488
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
Use a prefix scan when fetching documents matching a query. #488
Conversation
Minor optimization (which is already present in the ts code).
| XCTAssertEqual([results count], [expected count]); | ||
| for (FSTDocument *doc in expected) { | ||
| XCTAssertEqualObjects([results objectForKey:doc.key], doc); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The TODO below is now no longer relevant, is it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope. Removed.
| FSTDocumentDictionary *results = [self.remoteDocumentCache documentsMatchingQuery:query]; | ||
| NSArray *expected = | ||
| @[ FSTTestDoc(@"b/1", kVersion, _kDocData, NO), FSTTestDoc(@"b/2", kVersion, _kDocData, NO) ]; | ||
| XCTAssertEqual([results count], [expected count]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also port the comment from JS (which is a little more descriptive than we we have here).
// TODO(mikelehen): This just verifies that we do a prefix scan against the
// query path. We'll need more tests once we add index support.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
- remove now-redundant TODO - add more descriptive text to the test (ported from ts code).
…#488) Minor optimization (which is already present in the ts code).
* Initial source drop - sync'd at 263414281 * Public headers * Initial podspec and 1st pass at imports * initial build fixes * Successful library and tests build * Two test failures left * All unit tests pass * Initial look at unused tests * Fix macOS build (no need for import UIKit) * style * Add copyrights * Use, obfuscate, and verify 2nd App plist * fix some warnings * Fix analyze issues * Changelog updates * Minor comment cleanup.
Minor optimization (which is already present in the ts code).
http://b/36351543