-
-
Notifications
You must be signed in to change notification settings - Fork 172
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
filter operators #32
filter operators #32
Conversation
Now you can make a filter like so: let filter: Filter = "name" == "Evert" && id ~= 1…5 Which would print as: (name = Evert and id in [1, 2, 3, 4, 5])
You used to be able to do this: ```swift let filter: Filter = .subset( "id", .notIn, [ 1, "string", NSDate() ] ) ``` Which I think shouldn’t be possible. So now that’s not possible anymore, the array has to be homogeneous.
This reverts commit d0662e7.
I really like this addition. I'm close to merging a refactor to Fluent and we can add this to it afterward. |
Cool, happy to hear this work was not for nothing. @Joannis also suggested on Slack to add 3 more filters, namely |
Or what we could also do is not add |
Let's revisit #33. The query model has changed significantly since May. |
Now you can make a filter like so:
Which would print
((name = Evert and age > 18) or (id in [1, 2, 3, 4, 5] and birthday < 1990-11-03))
This is just to show you a work in progress. I didn't update any of the other code to work with this change. So in its current form Fluent would not compile.
I just wanted to ask you guys how you like it so far. So er.. how do you like it so far? ^_^
If you guys approve then I would like to continue to change the
Query
class so you can just do something like: