-
Notifications
You must be signed in to change notification settings - Fork 3
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
Feature/mango #143
Feature/mango #143
Conversation
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.
there are many features in this PR, can you remove anything not related to mango queries into new PRs please?
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.
please add specs
Did you see the work Sean had started here - #128 |
Ah, right... that was done for Dolly 2.x, 3.x is a different basecode, still @ErickFabian take a look and see if there is something that can help us. |
@javierg Yeah i'll take a look at it, this seems like a different approach but i'll look into integrating it |
I don't remember the details, but Sean worked hard to create some pattern or something that was going to make building queries easier. He was pretty excited about it at the time. I can't comment on whether it was good, bad or helpful. I just remember he put a fair amount of work into it, so it would be a shame to see it wasted. |
lib/dolly/mango.rb
Outdated
end | ||
|
||
def is_operator?(key) | ||
COMBINATION_OPERATORS.include?(key) || CONDITION_OPERATORS.include?(key) |
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.
You can DRY this having a check on everything. Something like ALL_OPERATORS.include?(key)
Having a constant that include both ALL_OPERATORS = COMBINATION_OPERATORS + CONDITION_OPERATORS
Yes we will look at it, and see to integrate the query pattern, this PR is simply using the default JSON query lang from Mango, this will allow us to start working, later we can implement Seans API, unfortunately , Dolly 1 and 2 code has some fundamental issues with performance and architecture that makes that code incompatible with current Dolly 3 |
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.
So Dolly 3 will be faster??? Sweet!!! |
A little faster, but it retains a lot less objects in memory... and I mean A LOT LESS! |
ohhhhhhh I will take that over the speed.... memory is always the issue in the apps and its usually because of large queries holding memory. |
👏 I miss couch |
It's here.... waiting for you....It misses you to @seancookr |
Adds base mango querys for dolly documents
Pending Work:
Mango query indexes
Working example