Fix bug in unrolling with-columns args
This commit is contained in:
parent
cf136c2fdc
commit
b32911d808
1 changed files with 7 additions and 4 deletions
|
|
@ -221,12 +221,15 @@
|
||||||
which used to be needed for DDL)."
|
which used to be needed for DDL)."
|
||||||
{:arglists '([& col-specs] [col-spec-coll])}
|
{:arglists '([& col-specs] [col-spec-coll])}
|
||||||
[& args]
|
[& args]
|
||||||
;; special case so (with-columns [[:col-1 :definition] [:col-2 :definition]])
|
;; special cases so (with-columns [[:col-1 :definition] [:col-2 :definition]])
|
||||||
;; also works in addition to (with-columns [:col-1 :definition] [:col-2 :definition])
|
;; also works in addition to (with-columns [:col-1 :definition] [:col-2 :definition])
|
||||||
(cond (and (= 1 (count args)) (sequential? (first args)) (sequential? (ffirst args)))
|
(cond (and (= 1 (count args)) (sequential? (first args)) (sequential? (ffirst args)))
|
||||||
(generic-1 :with-columns args)
|
(generic :with-columns (cons {} (first args)))
|
||||||
(and (= 2 (count args)) (sequential? (second args)) (sequential? (fnext args)))
|
(and (= 2 (count args))
|
||||||
(generic-1 :with-columns args)
|
(map? (first args))
|
||||||
|
(sequential? (second args))
|
||||||
|
(sequential? (first (second args))))
|
||||||
|
(generic :with-columns (cons (first args) (second args)))
|
||||||
:else
|
:else
|
||||||
(generic :with-columns args)))
|
(generic :with-columns args)))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue