summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarlo Zancanaro <carlo@clearboxsystems.com.au>2013-07-12 11:14:25 +1000
committerCarlo Zancanaro <carlo@clearboxsystems.com.au>2013-07-12 11:14:25 +1000
commit788b0ffb104abb730e7eb105885b879bc5c051d3 (patch)
tree87e300e9cab4f877ee2085454b006136fe6bb8fa /src
parent768006571aaa1b036974ba5dec648b531de49363 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/clojure_sql/compiler.clj3
1 files changed, 1 insertions, 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))