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
Currently,
Facility.select.output_columns(["name"].filter("levels == 'A' && levels == 'B' && levels == 'C'")
I want to write same query like following:
Facility.select.output_columns(["name"]).filter.in_values(:levels, include_all: true, %w(A B C)) # or Facility.select.output_columns(["name"]).filter.include_all_values(:levels, %w(A B C))
How about this?
The text was updated successfully, but these errors were encountered:
Extending in_values isn't good idea. in_values is the same semantics as IN in SQL. We should not add AND mode to in_values.
in_values
IN
AND
The following will return what you want:
Facility.select.filter("query(%{match_columns}, %{query})", match_columns: "levels", query: "A B C")
It's a good idea that we provide the following API for this use case:
select.filter.query([:levels], "A B C")
NOTE: It seems that using == for vector is unexpected. @ is a suitable operator for "whether the specified element is included in the vector" query.
==
@
Sorry, something went wrong.
is LGTM.
No branches or pull requests
Currently,
I want to write same query like following:
How about this?
The text was updated successfully, but these errors were encountered: