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
I have the following schema
CREATE TABLE user_events ( account_uuid uuid, user_uuid uuid, timestamp bigint, event text, .... PRIMARY KEY ((account_uuid, user_uuid), timestamp, event) ) WITH .....
Trying to query by a timestamp
import Ecto.Query My.Repo.all(from event in UserEvents, where: event.account_uuid == ^account_uuid and event.user_uuid == ^user_uuid and event.timestamp >= ^timestamp)
generates a query
select * from user_events where ((account_uuid = <some uuid>) AND (user_uuid = <some uuid>)) AND (timestamp >= 201702140000); SyntaxException: <ErrorMessage code=2000 [Syntax error in CQL query] message="line 1:149 missing EOF at ')' (... AND (user_uuid = <some uuid>)[)] AND...)">
The query works if the outer parenthesis is removed.
My.Repo.all(UserEvents |> where([c], c.account_uuid == ^account_uuid) |> where([c], c.user_uuid == ^user_uuid)) |> where([c], c.timestamp >= ^timestamp) )
breaks as that case is not handled.
I could get the first case working by changing adapter/cql.ex
defp op_to_binary({op, _, [_, _]} = expr, query) when op in @binary_ops, do: paren_expr(expr, query)
to
defp op_to_binary({op, _, [_, _]} = expr, query) when op in @binary_ops, do: expr(expr, query)
The text was updated successfully, but these errors were encountered:
abcba09
vintikzzz
No branches or pull requests
I have the following schema
Trying to query by a timestamp
generates a query
The query works if the outer parenthesis is removed.
breaks as that case is not handled.
I could get the first case working by changing adapter/cql.ex
to
The text was updated successfully, but these errors were encountered: