-
Notifications
You must be signed in to change notification settings - Fork 83
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
Adds support for collection filtering #12
Conversation
Thanks @charlieknoll. Can you please explain what is going on with this? What does the functionality do? How would it be used by the end user? |
Hi @dannyconnell, I was helping a friend out who was "querying" a collection of users for a user and then "querying" another collection of orders for that user. Currently localbase would support this:
But with the pull request implemented he could do this:
Looking at the code, I believe it would be more performant for large collections. BTW, congratulations on your success with fudget! I really enjoyed your PWA course. I felt your pain in the dev experience with clearing cache, refresh, refresh, etc. It inspired me to create a new dev tool called AppYoke. It's early going but you can check it out on my github. |
Tested working to filter the collection by other fields. |
Another alternative is to change get() to work similarly and consistently with the rest of the APIs. So get() should return all matched documents instead of only one result. But this will likely break backward compatibility. Or maintain get() for returning the first matched result and introduce a getAll() for all matched results.
e.g. set(), update(), delete() matched all:
|
Please @dannyconnell, would be great to have this functionality. |
@dannyconnell come on man! |
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.
Can confirm that it works.
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.
Great implementation...
Hi guys, I confirm that its working too, I did several tests on my end. I'll be merging this. |
No description provided.