Conversation
javierg
left a comment
There was a problem hiding this comment.
there are many features in this PR, can you remove anything not related to mango queries into new PRs please?
|
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.
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 |
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