Liking cljdoc? Tell your friends :D

clj-rocksdb


batchclj

(batch db)
(batch db {puts :put deletes :delete})

Batch a collection of put and/or delete operations into the supplied db. Takes a map of the form {:put [key1 value1 key2 value2] :delete [key3 key4]}. If :put key is provided, it must contain an even-length sequence of alternating keys and values.

Batch a collection of put and/or delete operations into the supplied `db`.
Takes a map of the form `{:put [key1 value1 key2 value2] :delete [key3 key4]}`.
If `:put` key is provided, it must contain an even-length sequence of alternating keys and values.
sourceraw docstring

boundsclj

(bounds db)

Returns a tuple of the lower and upper keys in the database or snapshot.

Returns a tuple of the lower and upper keys in the database or snapshot.
sourceraw docstring

compactclj

(compact db)
(compact db start)
(compact db start end)

Forces compaction of database over the given range. If start or end are nil, they default to the full range of the database.

Forces compaction of database over the given range. If `start` or `end` are nil, they default to
the full range of the database.
sourceraw docstring

create-dbclj

(create-db directory
           {:keys [key-decoder key-encoder val-decoder val-encoder
                   create-if-missing? error-if-exists? write-buffer-size
                   block-size max-open-files cache-size comparator compress?
                   paranoid-checks? block-restart-interval logger]
            :or {cache-size 32
                 block-size (* 16 1024)
                 val-decoder identity
                 create-if-missing? true
                 key-decoder identity
                 key-encoder identity
                 write-buffer-size (* 32 1024 1024)
                 error-if-exists? false
                 compress? true
                 val-encoder identity}
            :as options})

Creates a closeable database object, which takes a directory and zero or more options.

The key and val encoder/decoders are functions for transforming to and from byte-arrays.

Creates a closeable database object, which takes a directory and zero or more options.

The key and val encoder/decoders are functions for transforming to and from byte-arrays.
sourceraw docstring

deleteclj

(delete db)
(delete db key)
(delete db key & keys)

Deletes one or more keys in the given db.

Deletes one or more keys in the given `db`.
sourceraw docstring

destroy-dbclj

(destroy-db directory)

Destroys the database at the specified directory.

Destroys the database at the specified `directory`.
sourceraw docstring

getclj

(get db key)
(get db key default-value)

Returns the value of key for the given database or snapshot. If the key doesn't exist, returns default-value or nil.

Returns the value of `key` for the given database or snapshot. If the key doesn't exist, returns
`default-value` or nil.
sourceraw docstring

IRocksDBcljprotocol

source

iteratorclj

(iterator db)
(iterator db start)
(iterator db start end)

Returns a closeable sequence of map entries (accessed with key and val) that is the inclusive range from startto end. If exhausted, the sequence is automatically closed.

Returns a closeable sequence of map entries (accessed with `key` and `val`) that is the inclusive
range from `start `to `end`.  If exhausted, the sequence is automatically closed.
sourceraw docstring

putclj

(put db)
(put db key val)
(put db key val & key-vals)

Puts one or more key/value pairs into the given db.

Puts one or more key/value pairs into the given `db`.
sourceraw docstring

reverse-iteratorclj

(reverse-iterator db)
(reverse-iterator db start)
(reverse-iterator db start end)

Returns a closeable sequence of map entries (accessed with key and val) that is the inclusive range from startto end in reverse order. If exhausted, the sequence is automatically closed.

Returns a closeable sequence of map entries (accessed with `key` and `val`) that is the inclusive
range from `start `to `end` in reverse order.  If exhausted, the sequence is automatically closed.
sourceraw docstring

snapshotclj

(snapshot db)

Returns a snapshot of the database that can be used with get and iterator. This implements java.io.Closeable, and can leak space in the database if not closed.

Returns a snapshot of the database that can be used with `get` and `iterator`. This implements
java.io.Closeable, and can leak space in the database if not closed.
sourceraw docstring

statsclj

(stats db property)

Returns statistics for the database.

Returns statistics for the database.
sourceraw docstring

syncclj

(sync db)

Forces the database to fsync.

Forces the database to fsync.
sourceraw docstring

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

× close