summaryrefslogtreecommitdiff
path: root/src/clojure_sql/core.clj
diff options
context:
space:
mode:
authorCarlo Zancanaro <carlo@clearboxsystems.com.au>2013-06-20 15:49:55 +1000
committerCarlo Zancanaro <carlo@clearboxsystems.com.au>2013-06-20 15:49:55 +1000
commit54c6a5dec031de59dad385d4ba2ccda09a70ec2a (patch)
tree5d428dc6ee23d7bbe4c5f846d6e22474e1a1cefe /src/clojure_sql/core.clj
parent3ce695f6b2daf943490b2b4a9dac7be01bdd6356 (diff)
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.
Diffstat (limited to 'src/clojure_sql/core.clj')
-rw-r--r--src/clojure_sql/core.clj4
1 files changed, 4 insertions, 0 deletions
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")))