This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-09-09
Channels
- # announcements (5)
- # beginners (53)
- # clj-kondo (4)
- # cljdoc (3)
- # cljs-dev (11)
- # cljsjs (1)
- # clojure (59)
- # clojure-europe (15)
- # clojure-italy (6)
- # clojure-nl (9)
- # clojure-spec (22)
- # clojure-uk (26)
- # clojurescript (16)
- # clojutre (6)
- # cursive (27)
- # datomic (34)
- # duct (1)
- # figwheel-main (2)
- # fulcro (12)
- # graphql (14)
- # jackdaw (9)
- # jobs (1)
- # kaocha (4)
- # luminus (1)
- # off-topic (11)
- # pathom (1)
- # pedestal (2)
- # re-frame (6)
- # reagent (10)
- # ring-swagger (34)
- # shadow-cljs (47)
- # spacemacs (21)
- # sql (3)
- # tools-deps (37)
- # uncomplicate (11)
- # vim (17)
I'm trying to shift my thinking from an app shared atom
(:db @app)
to using the :duct.module/sql
key. The smallest step to refactor my app to at least "compile" is to switch out a function state/app-db
that used to return the db spec (:db @app)
. How can I evaluate the ig/ref for key :duct.module/sql to get back the db spec? so far I have (ns watchdude.state
(:require [duct.database.sql :as sql]
[integrant.core :as ig]
[taoensso.timbre :as log])
(:import (duct.database.sql Boundary)))
(defmethod ig/init-key ::app-db [_ {:keys [db]}]
(log/info db)
db)
;; (defn app-db [] (:db @app)
(defn app-db "get db spec out of duct.database.sql"
[]
,,,)
with config.edn :duct.module/sql {:database-url "localhost"}
:watchdude.state/app-db {}