haskell-beam / haskell-beam/beam
Add combinator for ordering by primary keys
Open
enhancement
- Dominant language
- Haskell
- Stars
- 635
- Forks
- 193
- PR merge metrics
- No merged PRs in 30d
Description
It took us a good bit to figure out how to `orderBy_` the `primaryKey` of some arbitrary table. It would be much better if this were wrapped up in a combinator and documented:
```haskell
...
orderBy_ (allBeamValues descColumnar . primaryKey) $ all_ tbl
where
-- The last two type parameters of QOrd are phantoms
descColumnar :: Columnar' (QExpr syntax (QNested (QNested QBaseScope))) a -> QOrd syntax () ()
descColumnar (Columnar' col) = coerce $ desc_ col
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.