bitemyapp / bitemyapp/esqueleto
Using compound fields in an IN clause
- Dominant language
- Haskell
- Stars
- 399
- Forks
- 107
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 1
Description
Does esqueleto offer a way to use compound fields in an `IN` clause? e.g.
```
SELECT * FROM table_name WHERE (a, b) IN (...);
```
One would want to write
```haskell
where_ $ (entity ^. EntityA, entity ^. EntityB) `in_` valList ___
```
But of course this is not correct, as the left-hand side has type `(SqlExpr (Value a), SqlExpr (Value b))` whereas we need `SqlExpr (Value (a, b))`. It seems to me naively that such a function ought to be possible to define and add amongst the ["normal stuff"](https://hackage.haskell.org/package/esqueleto-3.5.11.2/docs/Database-Esqueleto-Experimental.html#g:10) utilities.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.