A Clojure library for Couchbase 7 with SDK 3.x.
(require '[clojure-couchbase.cluster :as clus]
'[clojure-couchbase.collection :as col])
(def cluster (clus/connect "couchbase://localhost" username password))
(def collection (col/get-collection cluster test-bucket))
;; insert doc
(col/upsert collection id {:a 1 :b 2})
;; read doc
(col/get collection id)
;; => { :content {:a 1 :b 2} }
(clus/query cluster "SELECT b.* FROM `bucket-name` b where name = \"smith\"")
;; => { :status QueryStatus/SUCCESS :rows [{:foo "xxx" :name "smith"}]}
;; tear down
(clus/disconnect cluster)
lein deps
./docker/up.sh
lein test
MIT