summaryrefslogtreecommitdiff
path: root/src/clojure_sql/compiler.clj
diff options
context:
space:
mode:
authorCarlo Zancanaro <carlo@clearboxsystems.com.au>2013-06-13 18:24:05 +1000
committerCarlo Zancanaro <carlo@clearboxsystems.com.au>2013-06-13 18:24:05 +1000
commit148f752b5f48707dc3d7fe448d1faf33d5cd0228 (patch)
treea61345f51f248c5061cf47630ea5eafcdf638408 /src/clojure_sql/compiler.clj
parente2bd4b4939d34fc9400c9843b691428d3888ecc4 (diff)
Starting a re-write of the DSL, to be followed by the compiler.
Flip around field/table aliases, do joins a bit differently. They're my main aims at the moment! I'll also add a preprocessor for the compiler to massage it into a nicer form there. I discovered that joins can be done with a pretty sweet syntax in SQL: (tableA LEFT JOIN tableB) RIGHT JOIN tableC This is pretty much perfect for my purposes. Flipping alias maps just makes more sense and removes a whole bunch of `flip-map` calls that would be unnecessary if the aliases were the other way around. The user-facing side of the DSL will be left unchanged, though. The user provides an `{old-name new-name}` map and internally we convert that into `{new-name old-name}`. Like magic. I'm also adding a bunch more tests. Hopefully that will make things more likely to work for long periods of time. Peace out!
Diffstat (limited to 'src/clojure_sql/compiler.clj')
-rw-r--r--src/clojure_sql/compiler.clj2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/clojure_sql/compiler.clj b/src/clojure_sql/compiler.clj
index 7ded112..ecd7bd6 100644
--- a/src/clojure_sql/compiler.clj
+++ b/src/clojure_sql/compiler.clj
@@ -211,7 +211,7 @@
(defn insert! [db query & records]
{:pre [(empty? (:joins query))]}
;; some code here
- ($str (return "Carlo"))
+ #_($str (return "Carlo"))
)
(defn update! [db query & partial-records]