seancorfield / next-jdbc

A modern low-level Clojure wrapper for JDBC-based access to databases.
https://cljdoc.org/d/com.github.seancorfield/next.jdbc/
Eclipse Public License 1.0
755 stars 90 forks source link

next.jdbc.connection/jdbc-url generating `&` separated jdbcUrl instead of `;` separated jdbcUrl for h2:tcp #190

Closed vettukal closed 2 years ago

vettukal commented 2 years ago

Describe the bug DB spec generated is incorrect for h2:tcp connections.

To Reproduce Code to reproduce the behavior

(def db2 {
          :dbtype "h2:tcp"
          :classname "org.h2.Driver"
          :host "localhost/~/test"
          :user "sa"
          :password "sa"
          })
(next.jdbc.connection/jdbc-url db2)

Results in: "jdbc:h2:tcp://localhost/~/test/?user=sa&password=sa" Expected behavior Expected value: "jdbc:h2:tcp://localhost/~/test;user=sa;password=sa"

project.clj/deps.edn If possible, please include your Leiningen or clj dependencies, at least for Clojure, next.jdbc, and the database drivers you are using.

                  [[org.clojure/clojure "1.10.0"]
                  [javax.servlet/servlet-api "2.5"]
                  [ring "1.9.0"]
                  [metosin/reitit "0.5.12"]
                  [metosin/muuntaja "0.6.8"]
                  [com.github.seancorfield/next.jdbc "1.2.737"]
                  [com.h2database/h2 "1.4.199"]
                  [org.clojure/data.json "2.4.0"]
                  [clj-http "3.12.3"]]
vettukal commented 2 years ago

Just tried it with :property-separator ";" and its working as expected.