We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It would be useful to have more filters in addition to eq and in.
eq
in
There's some ideas in this library: https://github.com/mathieuprog/query_builder/blob/master/lib/query/where.ex#L140
And from Hasura's where syntax: https://hasura.io/docs/latest/graphql/core/databases/postgres/queries/query-filters.html#the-where-argument
Usage:
Crudry.Query.filter(MySchema, %{id: 5, age: %{gte: 20, lte: 70}, name: %{neq: "John"}})
It would also be nice to have an or operator but I'm not sure what that syntax might look like.
https://hasura.io/docs/latest/graphql/core/databases/postgres/queries/query-filters.html#text-search-or-pattern-matching-operators-like-similar-etc
Crudry.Query.filter(MySchema, %{name: %{like: "%John%"}})
And we could check instead of is_list or binary, check for map and it's operators.
If this sounds useful I'd be glad to work on this feature (and am interested in other's feedback & ideas).
The text was updated successfully, but these errors were encountered:
No branches or pull requests
It would be useful to have more filters in addition to
eq
andin
.There's some ideas in this library: https://github.com/mathieuprog/query_builder/blob/master/lib/query/where.ex#L140
And from Hasura's where syntax: https://hasura.io/docs/latest/graphql/core/databases/postgres/queries/query-filters.html#the-where-argument
Suggestions
Comparison operators
Usage:
Crudry.Query.filter(MySchema, %{id: 5, age: %{gte: 20, lte: 70}, name: %{neq: "John"}})
It would also be nice to have an or operator but I'm not sure what that syntax might look like.
Search operators
https://hasura.io/docs/latest/graphql/core/databases/postgres/queries/query-filters.html#text-search-or-pattern-matching-operators-like-similar-etc
Usage:
Crudry.Query.filter(MySchema, %{name: %{like: "%John%"}})
And we could check instead of is_list or binary, check for map and it's operators.
If this sounds useful I'd be glad to work on this feature (and am interested in other's feedback & ideas).
The text was updated successfully, but these errors were encountered: