-
Notifications
You must be signed in to change notification settings - Fork 927
Fix the ordering of the index-based lookup in getAll(keys) #6128
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
Conversation
🦋 Changeset detectedLatest commit: 7c28b16 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Size Report 1Affected Products
Test Logs |
Size Analysis Report 1This report is too large (127,563 characters) to be displayed here in a GitHub comment. Please use the below link to see the full report on Google Cloud Storage.Test Logs |
…k into mrschmidt/rdcbug
} | ||
} | ||
|
||
return ( |
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.
primitiveComparator
returns number, not boolean..how this works is not obvious to me..
Can we make it more explicit?
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.
JS compares by "thruhiness" and any non-null number is considered true. We could have something like:
let cmp = compare()
if (cmp) return cmp;
cmp = compare()
if (cmp) return cmp;
cmp = compare()
if (cmp) return cmp;
That was my original code but it is pretty bloated. Let me know what you prefer.
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.
I prefer the bloated way..
} | ||
} | ||
|
||
return ( |
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.
JS compares by "thruhiness" and any non-null number is considered true. We could have something like:
let cmp = compare()
if (cmp) return cmp;
cmp = compare()
if (cmp) return cmp;
cmp = compare()
if (cmp) return cmp;
That was my original code but it is pretty bloated. Let me know what you prefer.
This changes the ordering we user for multi-key lookups to match that of IndexedDB.
Fixes #6110