-
Notifications
You must be signed in to change notification settings - Fork 934
Fix the cursor expanding result set bug #6166
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
Changes from 6 commits
992b87a
923ad28
684a49f
4b8ce9a
e92bae1
e8c8985
8e353c6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -886,6 +886,23 @@ describe('IndexedDbIndexManager', async () => { | |
await verifyResults(queryWithRestrictedBound, 'coll/val4'); | ||
}); | ||
|
||
it('cannot expand result set from a cursor', async () => { | ||
await indexManager.addFieldIndex( | ||
fieldIndex('coll', { fields: [['c', IndexKind.ASCENDING]] }) | ||
); | ||
await addDoc('coll/val1', { 'a': 1, 'b': 1, 'c': 3 }); | ||
await addDoc('coll/val2', { 'a': 2, 'b': 2, 'c': 2 }); | ||
|
||
const testingQuery = queryWithStartAt( | ||
queryWithAddedOrderBy( | ||
queryWithAddedFilter(query('coll'), filter('c', '>', 2)), | ||
orderBy('c', 'asc') | ||
), | ||
bound([2], /* inclusive= */ true) | ||
); | ||
await verifyResults(testingQuery, 'coll/val1'); | ||
}); | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you also add another test (or just add to the existing test) for the other direction? e.g. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And that uncovers one more bug. |
||
it('support advances queries', async () => { | ||
// This test compares local query results with those received from the Java | ||
// Server SDK. | ||
|
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.
should this be TypeOrder.MaxValue? Android reference
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.