Liking cljdoc? Tell your friends :D

Hipflask: A Pouch for Rum

A ClojureScript atom interface to a PouchDB database.

Useful for making reactive rum apps that sync.

Usage

(def db (pouchdb "test"))
(put db {:_id "group/doc1" :number 1})
(put db {:_id "group/doc2" :number 1})
(def pa (pouch-atom db "group"))
(go (println (<!
  (swap! pa update-keys #{"group/doc1" "group/doc2"} update "number" inc))))

With Reagent, make sure to use a ratom as the cache.

(pouch-atom db "group" (r/atom {}))

Examples

Can you improve this documentation?Edit on GitHub

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

× close