Fork me on GitHub
#xtdb
<
2020-04-08
>
teodorlu12:04:35

Using Crux JDBC nodes, is it possible to use a connection string (`jdbc:postgresql://...`) directly, or do I have to split up into :crux.jdbc/host and others?

refset12:04:07

Hey, are you using next-jdbc?

refset12:04:58

Looks like you can alternatively use a single string by passing in :jdbcUrl

💯 8
teodorlu12:04:15

Just figured out that I didn't read the docs at https://opencrux.com/docs#config-jdbc as closely as I thought I did, you seem to mention this already 🙂

refset12:04:32

Crux transforms the keywords: https://github.com/juxt/crux/blob/master/crux-jdbc/src/crux/jdbc.clj#L127 so you will need to pass it in as :crux.jdbc/jdbcUrl

👍 4
refset12:04:03

To be fair I don't think our config section covers this exact approach (TIL!). You're welcome 🙂

teodorlu12:04:03

Ah, thanks. I was wondering about just how I should specify the URL, whether it was supposed to be under some :crux.jdbc/opts or something else 🙂

teodorlu12:04:42

Got it working! 🎉 I needed to specify db name outside of the connection string as well, which a kind error message reminded me of.

👏 4