From 04a7086687c80284195d27ec032066e8bf1fa223 Mon Sep 17 00:00:00 2001 From: Mike Blume Date: Mon, 15 Jun 2015 15:43:58 -0700 Subject: [PATCH] be clear that these are field accessors not function calls --- src/honeysql/format.clj | 8 ++++---- src/honeysql/types.clj | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/honeysql/format.clj b/src/honeysql/format.clj index 81d2b29..be8fd78 100644 --- a/src/honeysql/format.clj +++ b/src/honeysql/format.clj @@ -323,11 +323,11 @@ SqlCall (-to-sql [x] (binding [*fn-context?* true] - (let [fn-name (name (.name x)) + (let [fn-name (name (.-name x)) fn-name (fn-aliases fn-name fn-name)] - (apply fn-handler fn-name (.args x))))) + (apply fn-handler fn-name (.-args x))))) SqlRaw - (-to-sql [x] (.s x)) + (-to-sql [x] (.-s x)) clojure.lang.IPersistentMap (-to-sql [x] (let [clause-ops (sort-clauses (keys x)) @@ -354,7 +354,7 @@ (add-param pname x))))) SqlArray (-to-sql [x] - (str "ARRAY[" (comma-join (map -to-sql (.values x))) "]")) + (str "ARRAY[" (comma-join (map -to-sql (.-values x))) "]")) Object (-to-sql [x] (add-anon-param x))) diff --git a/src/honeysql/types.clj b/src/honeysql/types.clj index 0a594ce..c45332f 100644 --- a/src/honeysql/types.clj +++ b/src/honeysql/types.clj @@ -23,7 +23,7 @@ (apply (resolve `call) form)) (defmethod print-method SqlCall [^SqlCall o ^java.io.Writer w] - (.write w (str "#sql/call " (pr-str (into [(.name o)] (.args o)))))) + (.write w (str "#sql/call " (pr-str (into [(.-name o)] (.-args o)))))) (defmethod print-dup SqlCall [o w] (print-method o w)) @@ -48,7 +48,7 @@ ((resolve `raw) form)) (defmethod print-method SqlRaw [^SqlRaw o ^java.io.Writer w] - (.write w (str "#sql/raw " (pr-str (.s o))))) + (.write w (str "#sql/raw " (pr-str (.-s o))))) (defmethod print-dup SqlRaw [o w] (print-method o w)) @@ -76,7 +76,7 @@ ((resolve `param) form)) (defmethod print-method SqlParam [^SqlParam o ^java.io.Writer w] - (.write w (str "#sql/param " (pr-str (.name o))))) + (.write w (str "#sql/param " (pr-str (.-name o))))) (defmethod print-dup SqlParam [o w] (print-method o w)) @@ -97,14 +97,14 @@ (SqlArray. values nil)) (defn array-vals [^SqlArray a] - (.values a)) + (.-values a)) (defn read-sql-array [form] ;; late bind, as above ((resolve `array) form)) (defmethod print-method SqlArray [^SqlArray a ^java.io.Writer w] - (.write w (str "#sql/array " (pr-str (.values a))))) + (.write w (str "#sql/array " (pr-str (.-values a))))) (defmethod print-dup SqlArray [a w] (print-method a w))