Liking cljdoc? Tell your friends :D
Clojure only.

merkle-db.connection

Connections are stateful components which manage database identity and versioning. A connection is generally backed by a merkledag node store and a ref tracker.

More advanced connection implementations may optionally implement additional logic controlling updates, such as locking, conflict resolution, and authorization rules.

Connections are stateful components which manage database identity and
versioning. A connection is generally backed by a merkledag node store and a
ref tracker.

More advanced connection implementations may optionally implement additional
logic controlling updates, such as locking, conflict resolution, and
authorization rules.
raw docstring

connectclj

(connect store tracker)

Create a new connection to some backing storage and ref tracker.

Create a new connection to some backing storage and ref tracker.
raw docstring

IConnectioncljprotocol

Protocol for interacting with backing connection resources to work with one or more databases.

Protocol for interacting with backing connection resources to work with one
or more databases.

commit!clj

(commit! conn db)
(commit! conn db opts)

Ensure all data has been written to the backing block store and update the database's root value in the ref manager.

  • :force commit even if the versions don't match
Ensure all data has been written to the backing block store and update the
database's root value in the ref manager.

- `:force` commit even if the versions don't match

create-db!clj

(create-db! conn db-name attrs)

Initialize a new database. Optional attributes may be provided to merge into the root node data. If the attributes include a :merkledag.node/id, the database will use it as the root node.

Initialize a new database. Optional attributes may be provided to merge
into the root node data. If the attributes include a `:merkledag.node/id`,
the database will use it as the root node.

drop-db!clj

(drop-db! conn db-name)

Drop a database reference. Note that this will not remove block data, as it may be shared.

Drop a database reference. Note that this will not remove block data, as
it may be shared.

get-db-historyclj

(get-db-history conn db-name)
(get-db-history conn db-name opts)

Retrieve a history of the versions of the database.

Options may include:

  • :offset Skip this many matching results.
  • :limit Return at most this many results.
Retrieve a history of the versions of the database.

Options may include:

- `:offset`
  Skip this many matching results.
- `:limit`
  Return at most this many results.

list-dbsclj

(list-dbs conn)
(list-dbs conn opts)

List information about the available databases.

Options may include:

  • :named If set to a string, return databases whose names are prefixed by the value. This may also be a regular expression to match database names against.
  • :offset Skip this many matching results.
  • :limit Return at most this many results.
List information about the available databases.

Options may include:

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

open-dbclj

(open-db conn db-name)
(open-db conn db-name opts)

Open a database for use.

  • :version open a specific version of the database
Open a database for use.

- `:version` open a specific version of the database
raw docstring

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

× close