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
768 stars 90 forks source link

allow to specify username and password in get-connection #137

Closed strssndktn closed 4 years ago

strssndktn commented 4 years ago

JDBC allows to call .getConnection(username, password) to overwrite the credentials being specified in the DataSource object for that particular connection. next-jdbc's get-connection doesn't expose this possibility.

This feature request is merely aesthetic, as one can easily set up multiple DataSources or call .getConnection via Java Interop directly.

In case of pooled connections, c3p0 supports different pools per username and password. HikariCP doesn't support specifying username and password and will throw an exception.