Fork me on GitHub
#duct
<
2021-06-03
>
bocaj22:06:21

How should I connect to 2 databases?

rickmoynihan07:06:56

just configure two components. If they share the same key name, use integrant composite keys to identify them separately

iarenaza20:06:42

Assuming you are talking about SQL databases, in this gist, you can find a stripped down version of how we do it: https://gist.github.com/iarenaza/866b5291a96ae6d757c8af8f11d6958e We use a hexagonal architecture, that's why you'll se the port and adapter namespaces. Ultimately, the Sql record contains a spec value, which is the one you should use with clojure.java.jdbc or next.jdbc

🙏 3