From 788b0ffb104abb730e7eb105885b879bc5c051d3 Mon Sep 17 00:00:00 2001 From: Carlo Zancanaro Date: Fri, 12 Jul 2013 11:14:25 +1000 Subject: Handle parameter types in the compiler better The compiler handled them by converting most things to strings and embedding them in the query, but now I'm trying to put more of them in as query parameters. The advantage is that his handles types that might be database specific, or something. At the moment sequences are handled in the same way as before (with each element being a separate parameter), but this may be changed in future. --- src/clojure_sql/compiler.clj | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/clojure_sql/compiler.clj b/src/clojure_sql/compiler.clj index 26b0d54..87899f9 100644 --- a/src/clojure_sql/compiler.clj +++ b/src/clojure_sql/compiler.clj @@ -122,10 +122,9 @@ vector? (return (str (table-name db (first ex)) \. (field-name db (second ex)))) keyword? (return (field-name db ex)) regex? (>> (tell (str ex)) (return "?")) - string? (>> (tell ex) (return "?")) ;;(sql-string db ex) symbol? (return (string/upper-case (operator-name ex))) sequential? (compile-expression-sequential db ex) - (return ex))) + (>> (tell ex) (return "?")))) (defn ^:private make-table-name [db table & [alias]] (if (or (= table alias) (nil? alias)) -- cgit v1.2.3