Closed vinurs closed 3 years ago
I typically create a separate namespace for each database and create a defstate
to initialize the driver there. So, I'd structure it as:
(ns myapp.db.db1
(:require [mount.core :refer [defstate]))
(defstate db ...)
(ns myapp.db.db2
(:require [mount.core :refer [defstate]))
(defstate db ...)
Then you just reference the db you want to use by namespace.
if i have three database, the first and the second is pg, the third is mysql, how to use multi different db(eg, db1 db2 db3) to manipulate different database