diff options
author | Carlo Zancanaro <carlo@clearboxsystems.com.au> | 2013-05-14 11:12:05 +1000 |
---|---|---|
committer | Carlo Zancanaro <carlo@clearboxsystems.com.au> | 2013-05-14 11:12:05 +1000 |
commit | d70e99185025eeef545248321c04d885aa6a38c2 (patch) | |
tree | 0995a99feaee8de5ed0725db6f45ce34d247e682 /src/clojure_sql/util.clj | |
parent | a60e513dddaf82894b34f7e12f48922aa1217bac (diff) |
Most of the RA stuff works now.
Need to fix up the compilation to return a query ready for value substitution
by the jdbc stuff, or something (rather than embedding parameters in the
query).
Also need to add insert!, update! and delete! functions.
Diffstat (limited to 'src/clojure_sql/util.clj')
-rw-r--r-- | src/clojure_sql/util.clj | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/clojure_sql/util.clj b/src/clojure_sql/util.clj new file mode 100644 index 0000000..03c90f1 --- /dev/null +++ b/src/clojure_sql/util.clj @@ -0,0 +1,10 @@ +(ns clojure-sql.util) + +(defn flip [f] + (fn [& args] + (apply f (reverse args)))) + +(defn flip-map [m] + (->> m + (map (comp vec reverse)) + (into {}))) |