diff options
Diffstat (limited to 'src/clojure_sql')
-rw-r--r-- | src/clojure_sql/jdbc.clj | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/clojure_sql/jdbc.clj b/src/clojure_sql/jdbc.clj index 5a3a55d..253f680 100644 --- a/src/clojure_sql/jdbc.clj +++ b/src/clojure_sql/jdbc.clj @@ -18,8 +18,9 @@ (defn ^:private dotted-to-nested-maps [objs] (mapv dotted-to-nested-map-one objs)) -(defn jdbc-executor [connection-string] - (let [[_ db-type] (re-find #"^jdbc:([^:]+)" connection-string)] +(defn jdbc-executor [connection-string & [db-type]] + (let [db-type (or db-type + (keyword (second (re-find #"^([^:]+)" connection-string))))] (reify QueryExecutor (query [_ query] (let [compiled (compiler/compile-select db-type query)] |