Skip to content
Browse files

Add where clauses back in

  • Loading branch information...
swlkr committed Mar 12, 2019
1 parent 7b8c2a5 commit 8c05c57b77640e49e28130e3c3d5b89b23ef6af1
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/coast/db/sql.clj
@@ -70,7 +70,10 @@
(throw (Exception. (str "where requires vectors to work. You typed: " v)))
(if (utils/sql-vec? v)
(first v)
(let [[k op* val] v
(let [k (first v)
[op* val] (if (> 2 (count v))
[(second v) (nth v 2)]
['= (second v)])
parts (if (= '!= op*)
[(utils/sqlize k) (not-op val) (? val)]
[(utils/sqlize k) (op op*) (? op*)])]
@@ -488,6 +491,7 @@
:full-join {:full-join v}
:left-outer-join {:left-outer-join v}
:right-outer-join {:right-outer-join v}
:where (where v)
:order (order v)
:limit (limit v)
:offset (offset v)

0 comments on commit 8c05c57

Please sign in to comment.
You can’t perform that action at this time.