bitemyapp / bitemyapp/esqueleto
mixing up order of orderBy clause passes typechecking, produces bad sql
- Dominant language
- Haskell
- Stars
- 399
- Forks
- 107
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 1
Description
Original issue filed here: https://github.com/prowdsponsor/esqueleto/issues/142
Updated repro here: https://github.com/jkachmar/esqueleto-orderby-err
Error message:
```
... elided ...
[Debug#SQL] SELECT DISTINCT ON ("job_update"."job_id") "job_update"."id", "job_update"."at", "job_update"."job_id"
FROM "job", "job_update"
WHERE ("job"."company_id" = ?) AND ("job_update"."job_id" = "job"."id")
ORDER BY "job_update"."at" DESC, "job_update"."job_id" DESC
; [PersistInt64 1]
esqueleto-orderby-err: SqlError {sqlState = "42P10", sqlExecStatus = FatalError, sqlErrorMsg = "SELECT DISTINCT ON expressions must match initial ORDER BY expressions", sqlErrorDetail = "", sqlErrorHint = ""}
make: *** [test] Error 1
```
Seems relevant to #50
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.