Liking cljdoc? Tell your friends :D

convex.ref

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.
raw docstring

create-directclj

(create-direct cell)

Returs a direct ref to the given cell.

Returs a direct ref to the given `cell`.
sourceraw docstring

create-softclj

(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`.
sourceraw docstring

directclj

(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]].
sourceraw docstring

direct?clj

(direct? ref)

Is the given ref a direct ref?

Is the given `ref` a direct ref?
sourceraw docstring

embedded?clj

(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?
sourceraw docstring

encodingclj

(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.
sourceraw docstring

hashclj

(hash ref)

Returns the hash of the cell associated with the given ref.

Returns the hash of the cell associated with the given `ref`.
sourceraw docstring

missing?clj

(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?
sourceraw docstring

persisted?clj

(persisted? ref)

Is the given ref marked as persisted?

Is the given `ref` marked as persisted?
sourceraw docstring

resolveclj

(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.
sourceraw docstring

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

× close