-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Inserting without an optional index field causes unexpected behavior #6643
base: master
Are you sure you want to change the base?
Conversation
@@ -9,7 +9,6 @@ | |||
* - 'npm run test:browser' so it runs in the browser |
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.
Bonus: This script does not exist
Thanks for the PR. Indeed it looks like there is a bug. I will check. |
Ok so the query plan looks correct: "preparedQuery": {
"query": {
"selector": {
"_deleted": {
"$eq": false
}
},
"sort": [
{
"id": "asc"
}
],
"skip": 0
},
"queryPlan": {
"index": [
"_deleted",
"numberIndex",
"id"
],
"startKeys": [
false,
-9007199254740991,
-9007199254740991
],
"endKeys": [
false,
"�",
"�"
],
"inclusiveEnd": true,
"inclusiveStart": true,
"sortSatisfiedByIndex": false,
"selectorSatisfiedByIndex": true
}
}
I played around with the generated keyrange but I am not sure if this is even fixable. |
I found out: The premium IndexedDB RxStorage from RxDB does not have this problem because it uses custom index strings, not the composite index keys from native IndexedDB. |
This PR contains:
A BUG REPORT
Describe the problem you have without this PR
Documents inserted with a (not required) empty index field behave unexpectedly
Todos