Hey all — I'm setting up a new project with SQLite and next.jdbc and trying to port over some pragma configs from a java.jdbc setup I had before. Previously I just passed them as
:foreign_keys true
:cache_size 10000
:synchronous "NORMAL"
:journal_mode "WAL"
Is there a way to achieve this with next.jdbc?Hiya @martinklepsch, not sure if you are aware, but I did switch cljdoc over the use next.jdbc. No guarantees I got everything right, but here's the https://github.com/cljdoc/cljdoc/commit/162e16431e379567de66fc1d339dacbded3f3a6e and the https://github.com/cljdoc/cljdoc/blob/c3a6c69aa22e805bde6a68dc0e5a1895c12b0f69/src/cljdoc/config.clj#L57-L73.
Oooh, that's awesome! I wasn't aware but did check out my local cljdoc repo for that code (which seemingly hasn't been updated in a while 😀)
Totally works! I'm also just noticing that I missed this section in the docs:
> Any additional keys provided in the "db spec" will be passed to the JDBC driver as Properties when each connection is made. Alternatively, when used with next.jdbc.connection/->pool, additional keys correspond to setters called on the pooled connection object.
When using the Friendly SQL Functions, is there a way to see the raw query that's being executed?
Perhaps the with-logging might help here?
@dharrigan thanks for the pointer!
You're most welcome 🙂