Fixed aggregate without having to first arguments, which broke SELECT field order independence and aliasing
This commit is contained in:
parent
41095d18ce
commit
0ce17ccfcf
1 changed files with 32 additions and 28 deletions
|
|
@ -230,6 +230,10 @@
|
||||||
(defhelper aggregate [m aggregate-fn]
|
(defhelper aggregate [m aggregate-fn]
|
||||||
(assoc m :aggregate (first aggregate-fn)))
|
(assoc m :aggregate (first aggregate-fn)))
|
||||||
|
|
||||||
|
(defn aggregate
|
||||||
|
([table] (aggregate nil table))
|
||||||
|
([m table] (build-clause :aggregate m table)))
|
||||||
|
|
||||||
(defhelper spartition-by [m fields]
|
(defhelper spartition-by [m fields]
|
||||||
(assoc m :partition-by (collify fields)))
|
(assoc m :partition-by (collify fields)))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue