Seemingly more idiomatic use of aggregate clause by preventing aliasing in defhelper instead of by destructuring in formatter.
This commit is contained in:
parent
bdeb95d956
commit
41095d18ce
2 changed files with 2 additions and 2 deletions
|
|
@ -393,7 +393,7 @@
|
|||
(defmethod format-clause :over [[_ part-clause] _]
|
||||
(str "OVER " (to-sql part-clause)))
|
||||
|
||||
(defmethod format-clause :aggregate [[_ [aggregate-fn _]] _]
|
||||
(defmethod format-clause :aggregate [[_ aggregate-fn] _]
|
||||
(str (to-sql aggregate-fn)))
|
||||
|
||||
(defmethod format-clause :partition-by [[_ fields] _]
|
||||
|
|
|
|||
|
|
@ -228,7 +228,7 @@
|
|||
(update-in m [:over] (partial apply merge) (collify fields)))
|
||||
|
||||
(defhelper aggregate [m aggregate-fn]
|
||||
(assoc m :aggregate aggregate-fn))
|
||||
(assoc m :aggregate (first aggregate-fn)))
|
||||
|
||||
(defhelper spartition-by [m fields]
|
||||
(assoc m :partition-by (collify fields)))
|
||||
|
|
|
|||
Loading…
Reference in a new issue