duct

bocaj 2021-06-03T22:57:21.001Z

How should I connect to 2 databases?

2021-06-04T07:11:56.001100Z

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

iarenaza 2021-06-04T20:04:42.001300Z

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

🙏 1
bocaj 2021-06-05T16:28:48.001500Z

Thanks! Here’s a link to the doc https://github.com/duct-framework/duct/wiki/Configuration#composite-keys