I have managed to create a Connection and change the current schema by supplying an optional “opts” map to the get-connection
function, however I’m struggling to do something similar when creating a Datasource. https://github.com/seancorfield/next-jdbc/blob/develop/doc/all-the-options.md says:
“If you need additional options set on a connection, you can either use Java interop to set them directly, or provide them as part of the “db spec” hash map passed to get-datasource
(although then they will apply to all connections obtained from that datasource).”
I’ve tried adding :connection {:schema "SCHEMA_NAME"}
to the “db-spec” map which is passed to get-datasource
without success, the current schema isn’t changed.