Replies: 1 comment 1 reply
-
|
Oh, this an easy one - Rel8 already supports this! You're looking for blah <- each table1Scheda
present do
foo <- each table2Schema
where_ $ foo.x ==. blah.yAlternatively, you can use with hasFoo (each table1Schema)
where
hasFoo bar = do
foo <- each fooSchema
where_ $ foo.fooId ==. bar.fooIdAnother option is to bind the result of your hasFoo <- exists $ ...
where_ hasFooBut this isn't quite the same as |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello! Is there a way to encode in Rel8 the following idiom?
More specifically, is there a way to use
EXISTSin anExprcontext? Currentlyexistsseems to only work withinQuery, which makes it impossible to use it within awhere_clauseIs there a workaround for this at the moment? If not, are there any plans to implement this feature in the future?
For a little bit of context: in the project I'm currently working on we are trying to migrate from Hasql to Rel8 and a part of that is the conversion of filtering. The frontend sends potentially complex filters to the backend, which are then converted to an SQL expression that becomes part of a
where_clause. Hence the need to useexistswithin theExprcontext.Thanks for all the work you've put into this wonderful library!
Beta Was this translation helpful? Give feedback.
All reactions