Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refact(jdbc): using jdbc-url instead db-specs #17

Merged
merged 1 commit into from
Nov 7, 2024

Conversation

rafaeldelboni
Copy link
Member

@rafaeldelboni rafaeldelboni commented Oct 29, 2024

From next-jdbc docs:

If you need to pass in extra connection URL parameters, it can be easier to use next.jdbc.connection/jdbc-url to construct URL, e.g.,

(connection/->pool com.zaxxer.hikari.HikariDataSource
                   {:jdbcUrl
                    (connection/jdbc-url {:dbtype "mysql" :dbname "thedb" :useSSL false})
                    :username "dbuser" :password "secret"})

Here we pass :useSSL false to jdbc-url so that it ends up in the connection string, but pass :username and :password for the pool itself.

@rafaeldelboni rafaeldelboni added the enhancement New feature or request label Oct 29, 2024
@rafaeldelboni
Copy link
Member Author

Seems working fine on old app using this lib
rafaeldelboni/super-dice-roll-clj#25

@rafaeldelboni
Copy link
Member Author

clj-codes/docs.backend@2976c2f

Strangely, even if I switch to true in this fly.io app it still works, but create a connection without ssl

@rafaeldelboni rafaeldelboni marked this pull request as ready for review November 1, 2024 20:54
@rafaeldelboni rafaeldelboni merged commit ce473a8 into main Nov 7, 2024
7 checks passed
@rafaeldelboni rafaeldelboni deleted the refact/using-jdbc-url-instead-db-specs branch November 7, 2024 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant