(checkpoint! db)
(clear-index! idx)
(clear-index! db idx)
Clears all entries for a given index.
Clears all entries for a given index.
(close! x)
(crypto key-or-key-size)
(crypto key key-size)
(cursor idx)
(cursor db idx)
(cursor-traverse c on-entry-fn & {:keys [start-at]})
(db)
(db k)
(db k config)
Given a keyword database name opens that database if it exists, otherwise creates that database. Returns the default database given no arguments. If it does not exist the default database is created. If given a database instance returns that database instance.
Given a keyword database name opens that database if it exists, otherwise creates that database. Returns the default database given no arguments. If it does not exist the default database is created. If given a database instance returns that database instance.
(db-config &
{:keys [base-file base-file-path cache-priming? cache-size
checkpoint-delay-threshold checkpoint-rate
checkpoint-size-threshold checksum-pages-supplier
clean-shutdown? create-file-path? crypto custom-handlers
data-file data-files data-page-array direct-page-access?
durability-mode event-listeners enable-jmx? lock-timeout
lock-upgrade-rule map-data-files? max-cache-size
max-checkpoint-threads max-replica-threads min-cache-size
page-size prepare-handlers readonly? sync-writes?]})
(db-stats db)
(delete! k)
(delete! idx k)
(delete! idx t k)
Unconditionally removes the entry associated with the given key.
Unconditionally removes the entry associated with the given key.
(drop-index! idx)
(drop-index! db idx)
Drops a given index. If the index is not empty, first clears it.
Drops a given index. If the index is not empty, first clears it.
(exchange! k v)
(exchange! idx k v)
(exchange! idx t k v)
Unconditionally associates a value with the given key, returning the previous value.
Unconditionally associates a value with the given key, returning the previous value.
(flush! db)
(get-index -db k)
(get-index-by-id id)
(get-index-by-id db id)
(get-index-by-name nm)
(get-index-by-name db nm)
(index k)
(index -db k)
Given a string or keyword name opens that index, otherwise creates that index. Uses the default database if not specified. If given the integer id of an index will return the index instance. If given an index instance returns that index instance.
Given a string or keyword name opens that index, otherwise creates that index. Uses the default database if not specified. If given the integer id of an index will return the index instance. If given an index instance returns that index instance.
(index-entries-count idx)
Returns the number of entries in a given index.
Returns the number of entries in a given index.
(index-first)
(index-first cursor
&
{:keys [key-deserializer value-deserializer]
:or {key-deserializer *key-deserializer*
value-deserializer *value-deserializer*}})
Grabs the first entry for a given index.
Grabs the first entry for a given index.
(index-keys idx
&
{:keys [key-deserializer]
:or {key-deserializer *key-deserializer*}})
Returns all the keys from the index
Returns all the keys from the index
(index-last)
(index-last cursor
&
{:keys [key-deserializer value-deserializer]
:or {key-deserializer *key-deserializer*
value-deserializer *value-deserializer*}})
Grabs the last entry for a given index.
Grabs the last entry for a given index.
(index-names)
(index-names db)
(index-range start stop)
(index-range cursor
start
stop
&
{:keys [key-deserializer key-serializer value-deserializer]
:or {key-deserializer *key-deserializer*
key-serializer *key-serializer*
value-deserializer *value-deserializer*}})
Lazy seq over range of entries for a given index starting at start, or from beginning if start is nil, and ending before end, or through the end of the index if end is nil. Use inside with-cursor.
Lazy seq over range of entries for a given index starting at start, or from beginning if start is nil, and ending before end, or through the end of the index if end is nil. Use inside with-cursor.
(index-range* idx start stop)
(index-range* db
idx
start
stop
&
{:keys [key-deserializer key-serializer value-deserializer]
:or {key-deserializer *key-deserializer*
key-serializer *key-serializer*
value-deserializer *value-deserializer*}})
Eager seq over range of entries for a given index starting at start, or from beginning if start is nil, and ending before end, or through the end of the index if end is nil. Use inside with-cursor.
Eager seq over range of entries for a given index starting at start, or from beginning if start is nil, and ending before end, or through the end of the index if end is nil. Use inside with-cursor.
(index-range-keys start stop)
(index-range-keys cursor
start
stop
&
{:keys [key-deserializer key-serializer]
:or {key-deserializer *key-deserializer*
key-serializer *key-serializer*}})
Lazy seq over range of keys for a given index starting at start, and ending before end. Use inside with-cursor.
Lazy seq over range of keys for a given index starting at start, and ending before end. Use inside with-cursor.
(index-range-keys* idx start stop)
(index-range-keys* db
idx
start
stop
&
{:keys [key-deserializer key-serializer]
:or {key-deserializer *key-deserializer*
key-serializer *key-serializer*}})
Eager seq over range of entries for a given index starting at start, or from beginning if start is nil, and ending before end, or through the end of the index if end is nil. Use inside with-cursor.
Eager seq over range of entries for a given index starting at start, or from beginning if start is nil, and ending before end, or through the end of the index if end is nil. Use inside with-cursor.
(insert! k v)
(insert! idx k v)
(insert! idx t k v)
Associates a value with the given key, unless a corresponding value already exists.
Associates a value with the given key, unless a corresponding value already exists.
(load k)
(load idx k)
(load idx t k)
Returns a copy of the value for the given key, or null if no matching entry exists.
Returns a copy of the value for the given key, or null if no matching entry exists.
(open-db config)
Opens a database using the specified config. config
is either a
map or a DatabaseConfig
.
Opens a database using the specified config. `config` is either a map or a `DatabaseConfig`.
(open-index! k)
(open-index! db k)
(replace! k v)
(replace! idx k v)
(replace! idx t k v)
Associates a value with the given key, but only if a corresponding value already exists.
Associates a value with the given key, but only if a corresponding value already exists.
(seek idx k)
(seek db idx k)
Experimental function aimed at arriving at a uniform interface for the in-memory and durable indices. There is the additional level of indirection here with the index.
Experimental function aimed at arriving at a uniform interface for the in-memory and durable indices. There is the additional level of indirection here with the index.
(set-default-identity-and-db! k)
(set-default-identity-and-db! k config)
Sets the *default-identity*
and *db*
vars based on the
keyword k
. Creates a new database if needed otherwise uses
the existing db referenced by k
to set *db*
.
Sets the `*default-identity*` and `*db*` vars based on the keyword `k`. Creates a new database if needed otherwise uses the existing db referenced by `k` to set `*db*`.
(shutdown!)
(shutdown! db)
Calls shutdown on the database.
Calls shutdown on the database.
(store! k v)
(store! idx k v)
(store! idx t k v)
Unconditionally associates a value with the given key.
Unconditionally associates a value with the given key.
(sync! db)
(transaction db)
(transaction db mode)
Returns a new Transaction with the given durability mode, uses the default durability mode if none is specified
Returns a new Transaction with the given durability mode, uses the default durability mode if none is specified
(with-cursor idx & forms)
Evaluates body in the context of a specified cursor. The binding provides the the cursor for the evaluation of the body.
Evaluates body in the context of a specified cursor. The binding provides the the cursor for the evaluation of the body.
(with-cursor* idx f)
(with-db db & forms)
Evaluates body in the context of a specified database. The binding provides the the database for the evaluation of the body.
Evaluates body in the context of a specified database. The binding provides the the database for the evaluation of the body.
(with-db* db-key f)
(with-index idx & forms)
Evaluates body in the context of a specified index. The binding provides the the index for the evaluation of the body.
Evaluates body in the context of a specified index. The binding provides the the index for the evaluation of the body.
(with-index* idx f)
(with-transaction idx & forms)
(with-transaction* db f)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close