From 54c6a5dec031de59dad385d4ba2ccda09a70ec2a Mon Sep 17 00:00:00 2001 From: Carlo Zancanaro Date: Thu, 20 Jun 2013 15:49:55 +1000 Subject: Fix compiling of n-ary operators (0 & 1 args), add operator aliases n-ary operators with no arguments would break everything (compiling to "()"). This should no longer be the case. Additionally, unary operators (ie. negation) now compile properly in the one arg case. Operator aliases allow us to change how we refer to things like the "~" regex operator in postgresql. At the moment it's aliased as "$". Additionally: booleans now compile to upper case. --- src/clojure_sql/core.clj | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/clojure_sql/core.clj') diff --git a/src/clojure_sql/core.clj b/src/clojure_sql/core.clj index 72438a6..bd4b431 100644 --- a/src/clojure_sql/core.clj +++ b/src/clojure_sql/core.clj @@ -26,3 +26,7 @@ (def group #'d/group) (def having #'d/having) (def sort #'d/sort) + + +(-> (table :x) + (select `($ (- :a) #"bloo"))) -- cgit v1.2.3