bitemyapp / bitemyapp/esqueleto

countRows does not work with distinct

Open
#90 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Haskell
Stars
399
Forks
107
Avg merge
1d 17h
Merged PRs (30d)
1

Description

https://github.com/prowdsponsor/esqueleto/issues/157

>countRows is simply the string COUNT(*), makeSelect always emits SELECT DISTINCT. Thus the following invalid SQL is produced:

>SELECT DISTINCT COUNT(*) FROM table;

>Ideally makeSelect would be somewhat smart and automagically form the correct SELECT COUNT(DISTINCT *).

>My guess is we would have to treat countRows somewhat more special, than we do currently.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.