A ref
is a reference to a cell. Most of the time, is it used as an intermediary value between a database
and the CVM. Unless refs are handled in reference to an explicit database, database used when resolving is always the current
one bound to the local thread. See convex.cvm.db
, convex.db
.
A direct ref holds a direct reference to a cell whereas a soft ref might release its reference when there is pressure on memory. If needed, a soft ref will fetch its corresponding cell from a database.
A `ref` is a reference to a cell. Most of the time, is it used as an intermediary value between a database and the CVM. Unless refs are handled in reference to an explicit database, database used when resolving is always the current one bound to the local thread. See [[convex.cvm.db]], [[convex.db]]. A **direct ref** holds a direct reference to a cell whereas a **soft ref** might release its reference when there is pressure on memory. If needed, a **soft ref** will fetch its corresponding cell from a database.
(create-direct cell)
Returs a direct ref to the given cell
.
Returs a direct ref to the given `cell`.
(create-soft hash)
Returns a soft ref to the cell which encoding hashes to the given hash
.
Returns a soft ref to the cell which encoding hashes to the given `hash`.
(direct ref)
Returns a direct ref based on the given ref
, in case it is soft, in which case it will be resolved using
resolve
.
Returns a direct ref based on the given `ref`, in case it is soft, in which case it will be resolved using [[resolve]].
(direct? ref)
Is the given ref
a direct ref?
Is the given `ref` a direct ref?
(embedded? ref)
Is the given ref
embedded, meaning its encoding self contained in the encoding of its parent?
Is the given `ref` embedded, meaning its encoding self contained in the encoding of its parent?
(encoding ref)
Returns the encoding of the cell assocaited with the given ref
.
Reads from the thread-local database if ref
is soft and lost its cell.
Returns the encoding of the cell assocaited with the given `ref`. Reads from the thread-local database if `ref` is soft and lost its cell.
(hash ref)
Returns the hash of the cell associated with the given ref
.
Returns the hash of the cell associated with the given `ref`.
(missing? ref)
Is the cell for this ref
missing, meaning its neither cached nor present in the thread-local database?
Is the cell for this `ref` missing, meaning its neither cached nor present in the thread-local database?
(persisted? ref)
Is the given ref
marked as persisted?
Is the given `ref` marked as persisted?
(resolve ref)
Returns the cell
associated with the given ref
.
Reads from the thread-local database if ref
is soft and lost its cell.
Returns the `cell` associated with the given `ref`. Reads from the thread-local database if `ref` is soft and lost its cell.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close