(coerced kvdb {:keys [coerce uncoerce]})
(coerced kvdb coerce uncoerce)
Construct a coerced KVDB. Values will be transformed with the coerce function after being read from the underlying KVDB, and by the uncoerce function when before being written to the KVDB.
Construct a coerced KVDB. Values will be transformed with the coerce function after being read from the underlying KVDB, and by the uncoerce function when before being written to the KVDB.
(create! mutable-kvdb key value)
Create an entry in a MutableKVDB instance if and only if it an entry for the key does not already exist.
Create an entry in a MutableKVDB instance if and only if it an entry for the key does not already exist.
(entries readable-kvdb)
Return a sequence of all entries in a ReadableKVDB.
Return a sequence of all entries in a ReadableKVDB.
(exceeded-transact-attempts kvdb k f attempts & [cause])
Construct an exceeded transact attempts exception. This exception is thrown when an attempt to transact! an entry exceeds the maximum number of attempts due to concurrent modifications.
Construct an exceeded transact attempts exception. This exception is thrown when an attempt to transact! an entry exceeds the maximum number of attempts due to concurrent modifications.
(exceeded-transact-attempts-exception? ex)
Test for a exceeded-transact-attempts exception.
Test for a exceeded-transact-attempts exception.
(fetch readable-kvdb key)
(fetch readable-kvdb key missing-value)
Fetch an entry from a ReadableKVDB for the given key. Either nil or a provided missing-value will be returned when the entry is not found.
Fetch an entry from a ReadableKVDB for the given key. Either nil or a provided missing-value will be returned when the entry is not found.
(find-implementation kvdb protomethod)
Find the implementation of a protocol method for an object.
Find the implementation of a protocol method for an object.
(fmap-entry f ent)
Apply a function the value of an entry.
Apply a function the value of an entry.
(key-collision kvdb action k)
Construct a key collision exception. This exception is thrown when attempting to create! a new entry.
Construct a key collision exception. This exception is thrown when attempting to create! a new entry.
(key-collision-exception? ex)
Test for a key-collision exception.
Test for a key-collision exception.
(key-not-found kvdb action k)
Construct a key not found exception. This exception is throw when attempting to replace! or remove! an entry that does not exist.
Construct a key not found exception. This exception is throw when attempting to replace! or remove! an entry that does not exist.
(key-not-found-exception? ex)
Test for a key-not-found exception.
Test for a key-not-found exception.
(kvdb? x)
Checks if a value implements the ReadableKVDB protocol.
Checks if a value implements the ReadableKVDB protocol.
(kvdbable? x)
(merge-overridden-methods metadata method-impls)
(mutable-kvdb? x)
Checks if a value satifsfies both the ReadableKVDB and MutableKVDB protocols.
Checks if a value satifsfies both the ReadableKVDB and MutableKVDB protocols.
(overridable-kvdb? x)
Check if a KVDB instance supports the OverridableKVDB protocol.
Check if a KVDB instance supports the OverridableKVDB protocol.
(overridden kvdb)
(override kvdb implementations)
(override kvdb protocol-method implementation)
(page pageable-kvdb)
(page pageable-kvdb exclusive-start-key page-limit)
Retrieve a "page" of entries from a PageableKVDB. An exclusive-start-key of nil will start paging from the first entry.
Retrieve a "page" of entries from a PageableKVDB. An exclusive-start-key of nil will start paging from the first entry.
(pageable-kvdb? x)
Checks if a value satifsfies both the ReadableKVDB and PageableKVDB protocols.
Checks if a value satifsfies both the ReadableKVDB and PageableKVDB protocols.
(pageseq pageable-kvdb)
(pageseq pageable-kvdb exclusive-start-key page-limit)
Returns a lazy sequence of entries using page.
Returns a lazy sequence of entries using page.
(pop-overridden-methods metadata)
(pop-overrides kvdb)
(precondition-exception? ex)
(readable-kvdb? x)
Checks if a value implements the ReadableKVDB protocol.
Checks if a value implements the ReadableKVDB protocol.
(removal _)
Returns a token indicating a transacted value should be removed. Examples: (kvdb/transact! db "abc" kvdb/removal) (kvdb/transact! db "def" (fn [v] (if (even? (:xyz v)) (kvdb/removal v) v)))
Returns a token indicating a transacted value should be removed. Examples: (kvdb/transact! db "abc" kvdb/removal) (kvdb/transact! db "def" (fn [v] (if (even? (:xyz v)) (kvdb/removal v) v)))
(remove! mutable-kvdb key revision)
Remove an entry from a MutableKVDB instance if an only if the entry exists and it's revision number matches the revision number provided.
Remove an entry from a MutableKVDB instance if an only if the entry exists and it's revision number matches the revision number provided.
(replace! mutable-kvdb key revision new-value)
Replace an entry in a MutableKVDB instance with a new value if an only if the entry exists and it's revision number matches the revision number provided.
Replace an entry in a MutableKVDB instance with a new value if an only if the entry exists and it's revision number matches the revision number provided.
(revision entry)
Return the revision of a KVDB Entry.
Return the revision of a KVDB Entry.
(revision-mismatch kvdb action k actual-rev expected-rev)
Construct a revision mismatch exception. This exception is thrown when attempting to replace! or remove! an entry where the current revision does not match the supplied revision. This typically happens when a concurrent modification to the entry has occured.
Construct a revision mismatch exception. This exception is thrown when attempting to replace! or remove! an entry where the current revision does not match the supplied revision. This typically happens when a concurrent modification to the entry has occured.
(revision-mismatch-exception? ex)
Test for a revision-mismatch exception.
Test for a revision-mismatch exception.
(select-overridable-methods m)
Set the value for a key in the database without regard for the current state of the entry. Returns [old-entry new-entry], the state of the entry before and after it was set. Equivalent to (transact! kvdb k (constantly v)). Analogous to clojure.core/reset!.
Set the value for a key in the database without regard for the current state of the entry. Returns [old-entry new-entry], the state of the entry before and after it was set. Equivalent to (transact! kvdb k (constantly v)). Analogous to clojure.core/reset!.
(set-values! kvdb k v)
Set the value for a key in the database without regard for the current state of the entry. Returns [old-entry new-entry], the state of the entry before and after it was set. Equivalent to (transact-values! kvdb k (constantly v)). Analogous to clojure.core/reset-vals!.
Set the value for a key in the database without regard for the current state of the entry. Returns [old-entry new-entry], the state of the entry before and after it was set. Equivalent to (transact-values! kvdb k (constantly v)). Analogous to clojure.core/reset-vals!.
(to-kvdb x)
Coerce a potential KVDB value into a full KVDB.
Coerce a potential KVDB value into a full KVDB.
Atomically updates the value of an entry in a KVDB instance. The new value will be (apply f current-value-of-entry args). The trasacting function f may be called multiple times and should be free of side effects. Returns the new, updated state of the entry. Analogous to clojure.core/swap!.
Atomically updates the value of an entry in a KVDB instance. The new value will be (apply f current-value-of-entry args). The trasacting function f may be called multiple times and should be free of side effects. Returns the new, updated state of the entry. Analogous to clojure.core/swap!.
(transact-values! kvdb k f)
(transact-values! kvdb k f a)
(transact-values! kvdb k f a b)
(transact-values! kvdb k f a b c)
(transact-values! kvdb k f a b c & more-args)
Atomically updates the value of an entry in a KVDB instance. The new value will be (apply f current-value-of-entry args). The trasacting function f may be called multiple times and should be free of side effects. When an entry is not present, the current-value-of-entry will be nil. To remove an entry f can return (removal). Returns [old-entry new-entry], the state of the entry before and after the update. Analogous to clojure.core/swap-vals!.
Atomically updates the value of an entry in a KVDB instance. The new value will be (apply f current-value-of-entry args). The trasacting function f may be called multiple times and should be free of side effects. When an entry is not present, the current-value-of-entry will be nil. To remove an entry f can return (removal). Returns [old-entry new-entry], the state of the entry before and after the update. Analogous to clojure.core/swap-vals!.
(value entry)
Return the value of a KVDB Entry.
Return the value of a KVDB Entry.
(with-max-transact-attempts max-attempts & body)
Override the default maximum transaction attempts within a scope.
Override the default maximum transaction attempts within a scope.
(without-overridable-methods m)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close