This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-08-02
Channels
- # announcements (14)
- # beginners (133)
- # cider (27)
- # cljs-dev (7)
- # cljsjs (13)
- # clojure (105)
- # clojure-dev (58)
- # clojure-italy (1)
- # clojure-nl (17)
- # clojure-russia (33)
- # clojure-spec (5)
- # clojure-uk (154)
- # clojured (1)
- # clojurescript (35)
- # cloverage (4)
- # cursive (35)
- # datomic (58)
- # duct (8)
- # editors (9)
- # emacs (15)
- # events (1)
- # figwheel (47)
- # figwheel-main (132)
- # hyperfiddle (5)
- # immutant (29)
- # instaparse (21)
- # luminus (3)
- # off-topic (5)
- # onyx (5)
- # overtone (5)
- # pedestal (8)
- # re-frame (7)
- # reagent (6)
- # reitit (3)
- # schema (2)
- # shadow-cljs (178)
- # spacemacs (49)
- # specter (2)
- # sql (1)
- # tools-deps (110)
[:duct.database.sql/hikaricp :some.database/db1]
{:jdbc-url #duct/env ["JDBC_DATABASE_URL_DB1" Str]
:zero-date-time-behavior "CONVERT_TO_NULL"
:use-unicode true
:character-encoding "UTF-8"
:use-legacy-date-time-code false}
[:duct.database.sql/hikaricp :some.database/db2]
{:jdbc-url #duct/env ["JDBC_DATABASE_URL_DB2" Str]
:zero-date-time-behavior "CONVERT_TO_NULL"
:use-unicode true
:character-encoding "UTF-8"
:use-legacy-date-time-code false}
:some.handler/create
{:db #ig/ref :some.database/db1}
👍 4
Basically, the key is to not use the module directly, but to use composite keys for the keys the module itself would add. The same pattern can be used for including multiple servers, multiple migrators, etc
maybe something like this https://github.com/mariusz-jachimowicz-83/duct-datastore
replied to a thread:is it possible to have multiple database connections with `:duct.module/sql`?
[:duct.database.sql/hikaricp :some.database/db1]
{:jdbc-url #duct/env ["JDBC_DATABASE_URL_DB1" Str]
:zero-date-time-behavior "CONVERT_TO_NULL"
:use-unicode true
:character-encoding "UTF-8"
:use-legacy-date-time-code false}
[:duct.database.sql/hikaricp :some.database/db2]
{:jdbc-url #duct/env ["JDBC_DATABASE_URL_DB2" Str]
:zero-date-time-behavior "CONVERT_TO_NULL"
:use-unicode true
:character-encoding "UTF-8"
:use-legacy-date-time-code false}
:some.handler/create
{:db #ig/ref :some.database/db1}
👍 4
Has anyone extended the pedestal logger protocol to work with the duct logger component? I’m using pedestal in duct, and want the pedestal logging capabilities, but want to use only :duct/logger
rather than an additional pedestal logger.