Skip to content

A CouchDB backend for konserve with clutch.

License

Notifications You must be signed in to change notification settings

alekcz/konserve-clutch

 
 

Repository files navigation

konserve-clutch

A CouchDB implementation of the konserve kv-protocol on top of clutch.

Status

Clojure CI codecov

Usage

Clojars Project

[io.replikativ/konserve-clutch "0.1.4-SNAPSHOT"]

The purpose of konserve is to have a unified associative key-value interface for edn datastructures and binary blobs. Use the standard interface functions of konserve.

You can provide a clutch db object or connenction uri to the new-clutch-store constructor as an argument. We do not require additional settings beyond the konserve serialization protocol for the store, so you can still access the store through clutch directly wherever you need.

(require '[konserve-clutch.core :refer :all]
         '[clojure.core.async :refer [<!!] :as async]
         '[konserve.core :as k])
  
  (def clutch-store (<!! (new-clutch-store "http://username:password@localhost:5984/database")))

  (<!! (k/exists? clutch-store  "cecilia"))
  (<!! (k/get-in clutch-store ["cecilia"]))
  (<!! (k/assoc-in clutch-store ["cecilia"] 28))
  (<!! (k/update-in clutch-store ["cecilia"] inc))
  (<!! (k/get-in clutch-store ["cecilia"]))

  (defrecord Test [a])
  (<!! (k/assoc-in clutch-store ["agatha"] (Test. 35)))
  (<!! (k/get-in clutch-store ["agatha"]))

Changes

0.1.4

  • update to konserve 0.6.0

0.1.2

  • binary support
  • update to konserve 0.4
  • arbitrary key length (hashing)

0.1.1

  • use new reduced konserve interface and serializers

0.1.0

  • factor out from konserve

License

Copyright © 2014-2016 Christian Weilbach

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

About

A CouchDB backend for konserve with clutch.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Clojure 100.0%