Reference implementations of various databases.
Reference implementations of various databases.
(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.
(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.
(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.
(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.
(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.
(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.
A map of standard DB types to DB constructor functions.
A map of standard DB types to DB constructor functions.
(prefix-db)
(prefix-db opts)
Constructs a new prefix-isolated database
Constructs a new prefix-isolated database
(si-db)
(si-db opts)
Construct a fresh snapshot isolation DB.
Construct a fresh snapshot isolation DB.
(ssi-db)
(ssi-db opts)
Construct a fresh snapshot serializable isolation database.
Construct a fresh snapshot serializable isolation database.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close