Replies: 19 comments
-
This idea is blatantly stolen from ransack :) It doesn't have to be the same - but it's a good starting point |
Beta Was this translation helpful? Give feedback.
-
We'll start with a few basic ones and go from there:
These would only be available on fields that have been specified with |
Beta Was this translation helpful? Give feedback.
-
Is ransack AR-only? Could we use parts of their logic here? |
Beta Was this translation helpful? Give feedback.
-
Ransack is AR only yeah, we'll have to find a way to do it different |
Beta Was this translation helpful? Give feedback.
-
Yes it is. But here is something I found for: Sequel - https://github.com/djellemah/philtre |
Beta Was this translation helpful? Give feedback.
-
I think i'll reuse part of their predicate splitter logic @konung |
Beta Was this translation helpful? Give feedback.
-
It would be cool if we can add them as a dependency and help opening their API so we can reuse as much as possible. |
Beta Was this translation helpful? Give feedback.
-
We really can't, Unless you want to add both as dependency for either case, and translate towards their respective predicates (bit much if you ask me, cause that would equal to doing it ourselves) |
Beta Was this translation helpful? Give feedback.
-
No of course not 😂 |
Beta Was this translation helpful? Give feedback.
-
I figured you'd say that ;) I'll come up with a PoC for our own solution for this in the next few days |
Beta Was this translation helpful? Give feedback.
-
@konung https://github.com/trailblazer/trailblazer-finder/releases/tag/0.1.2 Initial release for default predicate filters |
Beta Was this translation helpful? Give feedback.
-
Copy from slack for consistency sake: yep just got the notification. I want to say : https://github.com/activerecord-hackery/ransack/blob/master/lib/ransack/locale/en.yml#L15 But to be honest we only use about 1/2 of those |
Beta Was this translation helpful? Give feedback.
-
One more we use sometimes is: |
Beta Was this translation helpful? Give feedback.
-
Update@fernandes kindly offered to implement the other predicates in a feature branch, while i'm going to focus on multiple order columns and rom-rb adapter. So just for reference@fernandes here's a little text on what we still need (and anything else that might come up in discussions on slack), and where to find what for predicates We need the following predicates still (for Hash, AR and Sequel), and their opposites:
Files for Predicates
Tests for Predicates:
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
@konung was already updating previous message. Regex shouldn't be too difficult either, but let's get these done first, then we move on to those. |
Beta Was this translation helpful? Give feedback.
-
With #8 and c2fa669 DataMapper now also has default predicates. All that's left for 0.2.0 release would be the predicates mentioned up here and ROM-RB Adapter. |
Beta Was this translation helpful? Give feedback.
-
@fernandes i added sw, ew, cont and their opposites for AR and some basic tests to cover them |
Beta Was this translation helpful? Give feedback.
-
New predicates we should make: |
Beta Was this translation helpful? Give feedback.
-
As discussed on slack, konung would like to see the following:
Beta Was this translation helpful? Give feedback.
All reactions