Skip to content
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

Add support for filtering using multi-field indexes correctly #3

Merged
merged 1 commit into from
Apr 13, 2015
Merged

Add support for filtering using multi-field indexes correctly #3

merged 1 commit into from
Apr 13, 2015

Conversation

robertfall
Copy link
Contributor

After becoming more familiar with the way treo emulates IndexedDB using WebSQL I realised that it's probably not feasible to do a proper query when filtering by index with a KeyRange with multiple fields.

I've taken a pass at fixing the testValue function to allow for KeyRanges with multiple fields. I wasn't sure how you run your tests for treo-websql as I assume it doesn't get used when running in PhantomJS. For what it's worth the test suite still passes with this change though as I say, I suspect it's not being used.

alekseykulikov added a commit that referenced this pull request Apr 13, 2015
Add support for filtering using multi-field indexes correctly
@alekseykulikov alekseykulikov merged commit 1b28513 into treojs:master Apr 13, 2015
@alekseykulikov
Copy link
Contributor

Thanks, man!
I don't have specific tests for treo-websql, I usually just replace it in treo using npm link. The code you provide, looks good and I will run some local tests and release new version on npm.

@alekseykulikov
Copy link
Contributor

all works, treo-websql@1.0.3 contains this fix.

@robertfall
Copy link
Contributor Author

@lukerandall thanks for your help on this. It's been merge now. ✋ 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants