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 #90

Open
bitemyapp opened this issue May 23, 2018 · 0 comments
Open

countRows does not work with distinct #90

bitemyapp opened this issue May 23, 2018 · 0 comments
Labels

Comments

@bitemyapp
Copy link
Owner

prowdsponsor/esqueleto#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.

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

No branches or pull requests

2 participants