-
-
Notifications
You must be signed in to change notification settings - Fork 643
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
query returning different results each time #15
Comments
Don't think the number of indexes are any problems. I'll do a unit test to
|
Could you describe how it increases the occurrence? Are you using toArray () or each() to get the results? The or method may (and usually does) produce the results in random order, but should never give different results. If you have a chance to provide a sample code and data to reproduce it that would be very helpful. Thanks, |
I could not reproduce the error. I replaced "age" with "id" to make the query on a registered index. Otherwise the query would fail each time with "NotFoundError" becuase the index "age" wasn't found. When using an existing index I always get the same results. I've tested in Chrome 36.0.1985.125, Opera 22.0.1471.70, Firefox 30 and IE11. I belive your error could be due to an error from an earlier write operaion you've made and did not wait for to finish. Check what happens if you catch your write operations performed prior to executing your or() query. When you start your query using the or() operation, the earlier write operation has not yet failed. When it fails, one of the or() parts will fail with the real error and the other with an "AbortError". Which one that gets the first error may vary. If you catch your or() operation you may get the actual error, or the AbortError. But the best thing is to catch the earlier write operations to see where they fail. These are my guesses and only a therory since I could not reproduce the error. In my test, I could execute 10 simiultanous queries with the or() method applied, as well as executing the in sequence. Each time I run the unit test I get the same results. Here's the code:
If you have some code to reproduce the error, your welcome and I will debug it for you, otherwise I will close this issue within some days. Thanks, |
hi, thanks for your detailed analysis and commitment to help ! i have indeed missed the 'age' indexing which might have been the source of the problem. |
hi, just wanted to check wether i am doing something wrong to get such "unstable" results.
i have played with dexie on top of Chrome and FFOS, as well as the webview on Android 4.1.2 up to 4.4 Kitkat, and on all of them the results of a query like below was different each time or so.
it seems to increase the occurrence, and even not responding at all when the
OR
clause is included in the query chain.the only creepy thing i have done was creating a lot of indexes...(14) too much ?
The text was updated successfully, but these errors were encountered: