Liking cljdoc? Tell your friends :D

Durable sources

The following options for durable sources are available now.

Default

If no configuration map is provided to the connect! function, mamulengo will choose for you: i) H2 for Clojure and ii) Local Storage for ClojureScript.

PostgreSQL (Clojure)

(def cfg {:durable-storage :postgresql
               :durable-conf {:dbtype "postgresql"
                              :dbname "mamulengo"
                              :password "test"
                              :port 54329
                              :user "test"}})

H2 Database (Clojure)

(def cfg {:durable-storage :h2
          :durable-conf {:dbtype "h2:mem"
                         :dbname "test_mamulengo"}})

Local Storage (ClojureScript)

(def cfg {:durable-storage :local-storage})

Remember that you need to explicitly clear the local-storage when you desire to tear-down the database.

Opt-out (Clojure(Script))

If you want to opt-out a durable storage you can pass the following keyword in the configuration map:

(def cfg {:durable-layer :off})

Can you improve this documentation?Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close