Liking cljdoc? Tell your friends :D

merkle-db.database

Core database functions.

Core database functions.
raw docstring

create-tableclj

(create-table db table-name attrs)

Create a new table with the given name and optional attributes to merge into the root node data. Returns an updated database value, or throws an exception if the table already exists.

Create a new table with the given name and optional attributes to merge into
the root node data. Returns an updated database value, or throws an exception
if the table already exists.
raw docstring

IDatabasecljprotocol

Protocol for interacting with a database at a specific version.

Protocol for interacting with a database at a specific version.

drop-tableclj

(drop-table db table-name)

Remove the named table from the database. Returns an updated database value.

Remove the named table from the database. Returns an updated database
value.

flush!clj

(flush! db)

Ensure any pending changes are persistently stored. Returns an updated database value.

Ensure any pending changes are persistently stored. Returns an updated
database value.

get-tableclj

(get-table db table-name)

Return a value representing the named table in the database, or nil if no such table exists.

Return a value representing the named table in the database, or nil if no
such table exists.

list-tablesclj

(list-tables db)
(list-tables db opts)

Return a sequence of maps with partial information about the tables in the database, including their name and total size.

Options may include:

  • :named If set to a string, return tables whose names are prefixed by the value. This may also be a regular expression to match table names against.
  • :offset Skip this many matching results.
  • :limit Return at most this many results.
Return a sequence of maps with partial information about the tables in the
database, including their name and total size.

Options may include:

- `:named`
  If set to a string, return tables whose names are prefixed by the value.
  This may also be a regular expression to match table names against.
- `:offset`
  Skip this many matching results.
- `:limit`
  Return at most this many results.

set-tableclj

(set-table db table-name value)

Set the state of the named table. Returns an updated database value.

Set the state of the named table. Returns an updated database value.
raw docstring

rename-tableclj

(rename-table db from to)

Update the database by moving the table named from to the name to. Returns an updated database value, or throws an exception if table from does not exist or to already exists.

Update the database by moving the table named `from` to the name `to`.
Returns an updated database value, or throws an exception if table `from`
does not exist or `to` already exists.
raw docstring

update-tableclj

(update-table db table-name f & args)

Update the table by calling f with the current table value and the remaining args. Returns an updated database value, or throws an exception if the table does not exist.

Update the table by calling `f` with the current table value and the
remaining `args`. Returns an updated database value, or throws an
exception if the table does not exist.
raw docstring

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

× close