Liking cljdoc? Tell your friends :D

konserve.core


appendclj/s

(append store key elem)
(append store key elem opts)

Append the Element to the log at the given key or create a new append log there. This operation only needs to write the element and pointer to disk and hence is useful in write-heavy situations.

Append the Element to the log at the given key or create a new append log there.
This operation only needs to write the element and pointer to disk and hence is useful in write-heavy situations.
sourceraw docstring

assocclj/s

(assoc store key val)
(assoc store key val opts)

Associates the key-vec to the value, any missing collections for the key-vec (nested maps and vectors) are newly created.

Associates the key-vec to the value, any missing collections for
the key-vec (nested maps and vectors) are newly created.
sourceraw docstring

assoc-inclj/s

(assoc-in store key-vec val)
(assoc-in store key-vec val opts)

Associates the key-vec to the value, any missing collections for the key-vec (nested maps and vectors) are newly created.

Associates the key-vec to the value, any missing collections for
the key-vec (nested maps and vectors) are newly created.
sourceraw docstring

bassocclj/s

(bassoc store key val)
(bassoc store key val opts)

Copies given value (InputStream, Reader, File, byte[] or String on JVM, Blob in JavaScript) under key in the store.

Copies given value (InputStream, Reader, File, byte[] or String on
JVM, Blob in JavaScript) under key in the store.
sourceraw docstring

bgetclj/s

(bget store key locked-cb)
(bget store key locked-cb opts)

Calls locked-cb with a platform specific binary representation inside the lock, e.g. wrapped InputStream on the JVM and Blob in JavaScript. You need to properly close/dispose the object when you are done!

You have to do all work in locked-cb, e.g.

(fn [{is :input-stream}] (let [tmp-file (io/file "/tmp/my-private-copy")] (io/copy is tmp-file)))

Calls locked-cb with a platform specific binary representation inside
the lock, e.g. wrapped InputStream on the JVM and Blob in
JavaScript. You need to properly close/dispose the object when you
are done!

You have to do all work in locked-cb, e.g.

(fn [{is :input-stream}]
  (let [tmp-file (io/file "/tmp/my-private-copy")]
    (io/copy is tmp-file)))
sourceraw docstring

dissocclj/s

(dissoc store key)
(dissoc store key opts)

Removes an entry from the store.

Removes an entry from the store. 
sourceraw docstring

exists?clj/s

(exists? store key)
(exists? store key opts)

Checks whether value is in the store.

Checks whether value is in the store.
sourceraw docstring

getclj/s

(get store key)
(get store key not-found)
(get store key not-found opts)

Returns the value stored described by key. Returns nil if the key is not present, or the not-found value if supplied.

Returns the value stored described by key. Returns nil if the key
is not present, or the not-found value if supplied.
sourceraw docstring

get-inclj/s

(get-in store key-vec)
(get-in store key-vec not-found)
(get-in store key-vec not-found opts)

Returns the value stored described by key. Returns nil if the key is not present, or the not-found value if supplied.

Returns the value stored described by key. Returns nil if the key
is not present, or the not-found value if supplied.
sourceraw docstring

get-lockclj/s

(get-lock {:keys [locks] :as _store} key)
source

get-metaclj/s

(get-meta store key)
(get-meta store key not-found)
(get-meta store key not-found opts)

Returns the value stored described by key. Returns nil if the key is not present, or the not-found value if supplied.

Returns the value stored described by key. Returns nil if the key
is not present, or the not-found value if supplied.
sourceraw docstring

go-lockedclj/smacro

(go-locked store key & code)
source

keysclj/s

(keys store)
(keys store opts)

Return a channel that will yield all top-level keys currently in the store.

Return a channel that will yield all top-level keys currently in the store.
sourceraw docstring

lockedclj/smacro

(locked store key & code)
source

logclj/s

(log store key)
(log store key opts)

Loads the whole append log stored at key.

Loads the whole append log stored at key.
sourceraw docstring

reduce-logclj/s

(reduce-log store key reduce-fn acc)
(reduce-log store key reduce-fn acc opts)

Loads the append log and applies reduce-fn over it.

Loads the append log and applies reduce-fn over it.
sourceraw docstring

updateclj/s

(update store key fn)
(update store key fn opts)

Updates a position described by key by applying up-fn and storing the result atomically. Returns a vector [old new] of the previous value and the result of applying up-fn (the newly stored value).

Updates a position described by key by applying up-fn and storing
the result atomically. Returns a vector [old new] of the previous
value and the result of applying up-fn (the newly stored value).
sourceraw docstring

update-inclj/s

(update-in store key-vec up-fn)
(update-in store key-vec up-fn opts)

Updates a position described by key-vec by applying up-fn and storing the result atomically. Returns a vector [old new] of the previous value and the result of applying up-fn (the newly stored value).

Updates a position described by key-vec by applying up-fn and storing
the result atomically. Returns a vector [old new] of the previous
value and the result of applying up-fn (the newly stored value).
sourceraw docstring

waitclj/s

(wait lock)
source

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

× close