From 2f5d432440ea0933cc3d1d8d1031cb6b3df29356 Mon Sep 17 00:00:00 2001 From: gered Date: Sat, 21 May 2016 16:31:14 -0400 Subject: [PATCH] use a more unique keyword name to hold hints in a view transaction --- src/views/honeysql/core.clj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/honeysql/core.clj b/src/views/honeysql/core.clj index f3b715b..3f9c282 100644 --- a/src/views/honeysql/core.clj +++ b/src/views/honeysql/core.clj @@ -12,11 +12,11 @@ "Like jdbc's with-db-transaction, but sends view hints at end of transaction." [binding & forms] (let [tvar (first binding), db (second binding), args (drop 2 binding)] - `(if (:hints ~db) ;; check if we are in a nested transaction + `(if (:views-honeysql/hints ~db) ;; check if we are in a nested transaction (let [~tvar ~db] ~@forms) (let [hints# (atom []) result# (j/with-db-transaction [t# ~db ~@args] - (let [~tvar (assoc ~db :hints hints#)] + (let [~tvar (assoc ~db :views-honeysql/hints hints#)] ~@forms))] (put-hints! @hints#) result#)))) @@ -40,7 +40,7 @@ ([db namespace action-map] (let [results (execute-honeysql! db action-map) hsql-hint (hint namespace (query-tables action-map) hint-type)] - (if-let [hints (:hints db)] + (if-let [hints (:views-honeysql/hints db)] (swap! hints conj hsql-hint) (put-hints! [hsql-hint])) results))