(append store key elem)
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.
(assoc store key val)
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.
(assoc-in store key-vec val)
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.
(bassoc store key val)
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.
(bget store key locked-cb)
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 a async thread of locked-cb, e.g.
(fn [{is :input-stream}] (async/thread (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 a async thread of locked-cb, e.g. (fn [{is :input-stream}] (async/thread (let [tmp-file (io/file "/tmp/my-private-copy")] (io/copy is tmp-file))))
(dissoc store key)
Removes an entry from the store.
Removes an entry from the store.
(exists? store key)
Checks whether value is in the store.
Checks whether value is in the store.
(get store key)
(get store key not-found)
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.
(get-in store key-vec)
(get-in store key-vec not-found)
Returns the value stored described by key-vec. Returns nil if the key-vec is not present, or the not-found value if supplied.
Returns the value stored described by key-vec. Returns nil if the key-vec is not present, or the not-found value if supplied.
(if-cljs then else)
Return then if we are generating cljs code and else for Clojure code. https://groups.google.com/d/msg/clojurescript/iBY5HaQda4A/w1lAQi9_AwsJ
Return then if we are generating cljs code and else for Clojure code. https://groups.google.com/d/msg/clojurescript/iBY5HaQda4A/w1lAQi9_AwsJ
(log store key)
Loads the whole append log stored at
Loads the whole append log stored at
(reduce-log store key reduce-fn acc)
Loads the whole append log stored at
Loads the whole append log stored at
(update store key fn & args)
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).
(update-in store key-vec fn & args)
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).
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close