Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

countRows does not work with distinct #157

Open
gkleen opened this issue May 23, 2018 · 1 comment
Open

countRows does not work with distinct #157

gkleen opened this issue May 23, 2018 · 1 comment

Comments

@gkleen
Copy link

gkleen commented May 23, 2018

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.

@bitemyapp
Copy link
Contributor

Hello! This the original repository but active maintenance is happening over on my fork of Esqueleto. I've refiled your issue here: bitemyapp/esqueleto#90

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants