Open gkleen opened 6 years ago
countRows is simply the string COUNT(*), makeSelect always emits SELECT DISTINCT. Thus the following invalid SQL is produced:
countRows
COUNT(*)
makeSelect
SELECT DISTINCT
SELECT DISTINCT COUNT(*) FROM table;
Ideally makeSelect would be somewhat smart and automagically form the correct SELECT COUNT(DISTINCT *).
SELECT COUNT(DISTINCT *)
My guess is we would have to treat countRows somewhat more special, than we do currently.
Hello! This the original repository but active maintenance is happening over on my fork of Esqueleto. I've refiled your issue here: https://github.com/bitemyapp/esqueleto/issues/90
countRows
is simply the stringCOUNT(*)
,makeSelect
always emitsSELECT DISTINCT
. Thus the following invalid SQL is produced:Ideally
makeSelect
would be somewhat smart and automagically form the correctSELECT COUNT(DISTINCT *)
.My guess is we would have to treat
countRows
somewhat more special, than we do currently.