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
in_
notIn
In SQL, a query like this is valid:
update people set active = false where (id, name) not in ((1, 'Jason'), (3, 'Fred'))
But I'm having trouble constructing that with esqueleto. Here's what I've tried:
update pairs $ p -> do set p [ PersonActive =. val False ] where_ $ (p ^. PersonId, p ^. PersonName) `notIn` valList pairs
where pairs is [ (PersonId, Text) ]
pairs
[ (PersonId, Text) ]
But that throws a lot of errors, starting with:
Couldn't match type ‘SqlExpr’ with ‘(,) (SqlExpr (E.Value (Key PersonId)))’
Is it possible to construct this type of query in esqueleto?
Thanks!
The text was updated successfully, but these errors were encountered:
Currently that's not possible. If you really need it, you may try playing with in_'s implementation (see here and here).
Sorry, something went wrong.
No branches or pull requests
In SQL, a query like this is valid:
But I'm having trouble constructing that with esqueleto. Here's what I've tried:
where
pairs
is[ (PersonId, Text) ]
But that throws a lot of errors, starting with:
Is it possible to construct this type of query in esqueleto?
Thanks!
The text was updated successfully, but these errors were encountered: