haskell-beam / haskell-beam/beam
Feature Request: inQuery_
- Dominant language
- Haskell
- Stars
- 635
- Forks
- 193
- PR merge metrics
- No merged PRs in 30d
Description
Sometimes it is desirable to be able to take queries that return a list of values and be able to use them in an "in" clause.
Example:
```sql
SELECT col1, col2 FROM tbl1 WHERE tbl1.col3 IN
(SELECT DISTINCT col3 FROM tbl1 WHERE cond1 AND cond2 LIMIT n)
FOR UPDATE SKIP LOCKED
```
Currently, `in_` requires you to have a list of `QGenExpr`s, It would be nice if a query could be placed on the right side of an `in_` like combinator instead of a haskell list.
I was hoping `subselect_` could fulfill my desires here, but it seems to only to take one argument, so I can't tell if it can be used for the above.
Is this something that would be possible?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.