Liking cljdoc? Tell your friends :D

jepsen.history.sim.db

Reference implementations of various databases.

Reference implementations of various databases.
raw docstring

brat-dbclj

(brat-db)
(brat-db opts)

Constructs a bratty database which performs no concurrency control and does not roll back aborted transactions.

Constructs a bratty database which performs no concurrency control and does
not roll back aborted transactions.
sourceraw docstring

Databasecljprotocol

abortclj

(abort database process)

Aborts the transaction for the given process. Returns a tuple: the new state of the database, followed by true if the transaction aborted, which should be always.

Aborts the transaction for the given process.
Returns a tuple: the new state of the database,
followed by true if the transaction aborted, which
should be always.

appendclj

(append database process key element)

Appends the given element to the current value of the given key. Returns [database', element]. If element is ::block, the given append can't be performed yet, but could be later.

Appends the given element to the current value of the given key.
Returns [database', element]. If element is ::block, the given
append can't be performed yet, but could be later.

beginclj

(begin database process)

Begins a new transaction for the given process. Returns the new state of the database.

Begins a new transaction for the given process.
Returns the new state of the database.

commitclj

(commit database process)

Commits the transaction for the given process. Returns a tuple: the new state of the database, followed by true if the transaction committed, false otherwise.

Commits the transaction for the given process.
Returns a tuple: the new state of the database,
followed by true if the transaction committed,
false otherwise.

readclj

(read database process key)

Reads the current state of a key. Takes the process performing the read. Returns [database', value]. value may be ::block, which indicates the given read can't be performed yet, but could be later.

Reads the current state of a key. Takes the process performing the
read. Returns [database', value]. value may be ::block, which indicates
the given read can't be performed yet, but could be later.
source

dbsclj

A map of standard DB types to DB constructor functions.

A map of standard DB types to DB constructor functions.
sourceraw docstring

prefix-dbclj

(prefix-db)
(prefix-db opts)

Constructs a new prefix-isolated database

Constructs a new prefix-isolated database
sourceraw docstring

si-dbclj

(si-db)
(si-db opts)

Construct a fresh snapshot isolation DB.

Construct a fresh snapshot isolation DB.
sourceraw docstring

ssi-dbclj

(ssi-db)
(ssi-db opts)

Construct a fresh snapshot serializable isolation database.

Construct a fresh snapshot serializable isolation database.
sourceraw docstring

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

× close