Adding a comment for future reference

This commit is contained in:
Andrii V. Mishkovskyi 2015-04-16 21:23:19 +02:00
parent 76303c2ffe
commit 11d4ff37ec

View file

@ -413,6 +413,12 @@
(comma-join (for [field fields] (comma-join (for [field fields]
(if (sequential? field) (if (sequential? field)
(let [[field order & [nulls-order]] field] (let [[field order & [nulls-order]] field]
;; Correct way of handling this would be to
;; expect a dictionary with either order,
;; nulls order or both at the same
;; time. However, so far I'm not sure how to
;; achieve that, so first iteration will have
;; to use dirty hacks.
(str (to-sql field) " " (if (= :desc order) (str (to-sql field) " " (if (= :desc order)
"DESC" "ASC"))) "DESC" "ASC")))
(to-sql field)))))) (to-sql field))))))