cbdrawer.client documentation

add!

(add! conn k value expiration)(add! conn k value)
Create an item iff it doesn't already exist. Returns a boolean indicating
whether the operation succeeded in a future.

add-or-cas!

(add-or-cas! conn k init f & args)
Atomically update an item with f and additional args. Returns the new value.
Takes an value to insert (as-is!) if the item does not already exist.

capi-bases

(capi-bases connectionfactory)
Get the Couch-API base URLs from a cluster/bucket.

cas!

(cas! conn k f & args)
Atomically update an item with f and additional args. Returns the new value.
Will fail if item does not exist.

client

(client factory)(client bucket password & uris)
Open a CouchbaseClient.
(client "bucketname" "password" "http://localhost:8091/") or (client factory)

delete!

(delete! conn k)
Delete an item. Returns a boolean indicating whether the operation succeeded
in a future

derefable-future

(derefable-future fut)
Wrap a java.util.concurrent.Future so it can be used with deref/@

factory

(factory bucket password & uris)
Create a CouchbaseConnectionFactory from a cluster base URI.
(factory "bucketname" "password" "http://localhost:8091/")

force!

(force! conn k value expiration)(force! conn k value)
Update the value of an item, creating it if it does not exist. Prefer cas!
to prevent clobbering other updates. Returns a boolean indicating whether
the operation succeeded in a future.

get

(get conn k)
Get an item, synchronously

get-async

(get-async conn k)
Get an item asynchronously. Returns the result in a future

set-transcoder!

(set-transcoder! transcoder)
Globally reset the default transcoder.

shutdown

(shutdown client)(shutdown client timeout unit)
Shut down a CouchbaseClient

update!

(update! conn k value expiration)(update! conn k value)
Update an item iff it already exists. Prefer cas! to prevent clobbering
other updates. Returns a boolean indicating whether the operation succeeded
in a future.

with-transcoder

macro

(with-transcoder xcoder & body)
Serialize and deserialize items in this block using the specified transcoder.
(with-transcoder my-transcoder exprs)