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

bugfix in prepareQuery for pouchdb #2213

Merged
merged 2 commits into from
May 24, 2020
Merged

Conversation

kunal15595
Copy link
Contributor

@kunal15595 kunal15595 commented May 23, 2020

This PR contains:

  • A BUGFIX

Describe the problem you have without this PR

In rx-storage-pouchdb.prepareQuery, a gt operator in selector is added if not already present.
This creates a problem if the selector originally has gte operator as pouch-find internally merges startKey for both these operators, mostly overriding gte with gt.

This PR checks for any comparison operators in selector for that key, and adds that hack only if required, and thereby avoiding reproduced issue.

Todos

  • Tests

pubkey added a commit that referenced this pull request May 24, 2020
@pubkey
Copy link
Owner

pubkey commented May 24, 2020

@kunal15595 wow, great work. I moved the test and added the bugfix to the changelog. merged.

@pubkey pubkey merged commit d9fbeb7 into pubkey:master May 24, 2020
pubkey added a commit that referenced this pull request May 27, 2020
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