This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-10-05
Channels
- # announcements (14)
- # aws (7)
- # babashka (28)
- # beginners (16)
- # calva (2)
- # cider (1)
- # clj-commons (8)
- # clj-kondo (29)
- # clojure (213)
- # clojure-europe (39)
- # clojure-losangeles (2)
- # clojure-norway (9)
- # clojure-spec (2)
- # clojurescript (11)
- # community-development (1)
- # conjure (2)
- # cursive (6)
- # datalevin (2)
- # datomic (8)
- # emacs (29)
- # events (1)
- # fulcro (22)
- # graalvm (14)
- # improve-getting-started (1)
- # jobs (1)
- # lambdaisland (5)
- # leiningen (4)
- # lsp (7)
- # malli (13)
- # meander (11)
- # membrane (13)
- # off-topic (23)
- # polylith (9)
- # re-frame (4)
- # reagent (7)
- # reitit (6)
- # releases (2)
- # sql (58)
- # testing (8)
- # tools-deps (18)
- # web-security (2)
Hello! I need an ability to have a setting, should I use Datomic or not. And if yes, then I make all the queries & transactions with my connection & db, but if not I want to have nils on any query & transaction without altering and even connecting to any db. Of course I may wrap all my code used Datomic api into (when ...) but there are so many places of it. Maybe there is a way of setting empty or blank connection parameters? Nil or {} fhrows an exceptions, maybe there is a way?
Perhaps redefine the relevant functions from Datomic API with something like (alter-var-root! #'datomic.api/q ...)
Of course, what's practical depends on the specifics of your problem. I imagine the above would work fairly well if there's one global setting to toggle, whereas it probably won't be as good if you have eg. a toggle per user.