Skip to content

NyanCAD/hipflask

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Releases

No releases published

Packages

No packages published