Liking cljdoc? Tell your friends :D

convex.run.exec

All aspects of actually executing transactions.

When an error is detected, fail is called.

All aspects of actually executing transactions.

When an error is detected, [[fail]] is called.
raw docstring

compileclj

(compile env)
(compile env trx-canonical)

Compiles the given, previously expanded trx using the current context.

See expand.

Compiles the given, previously expanded `trx` using the current context.

See [[expand]].
sourceraw docstring

evalclj

(eval env)
(eval env trx)

Evaluates trx.

Evaluates `trx`.
sourceraw docstring

execclj

(exec env)
(exec env trx-compiled)

Runs the given, previously compiled trx using the current context.

See compile.

Runs the given, previously compiled `trx` using the current context.

See [[compile]].
sourceraw docstring

expandclj

(expand env)
(expand env trx)

Expands the given trx using the current context.

Expands the given `trx` using the current context.
sourceraw docstring

failclj

(fail env err)

Must be called in case of failure, err being an error map (see the convex.run.err namespace).

Under $.catch/*stack* in the context is a stack of error handling transactions. This functions pops the next error handling transaction and prepends it to $.trx/*list*, the list of transactions pending for execution.

Also, error becomes available under $/*result*.

This simple scheme allows sophisticated exception handling to be implemented from CVX, as seen in the $.catch acccount.

Must be called in case of failure, `err` being an error map (see the [[convex.run.err]] namespace).

Under `$.catch/*stack*` in the context is a stack of error handling transactions. This functions pops
the next error handling transaction and prepends it to `$.trx/*list*`, the list of transactions pending
for execution.

Also, error becomes available under `$/*result*`.

This simple scheme allows sophisticated exception handling to be implemented from CVX, as seen in the
`$.catch` acccount.
sourceraw docstring

juiceclj

(juice env)

Computes consumed juice, extracting max-juice from the current value.

Computes consumed juice, extracting [[max-juice]] from the current value.
sourceraw docstring

max-juiceclj

Maximum juice value set on context prior to handling code.

Maximum juice value set on context prior to handling code.
sourceraw docstring

resultclj

(result env)

Extracts a result from the current context attached to env.

Extracts a result from the current context attached to `env`.
sourceraw docstring

sreqcljmultimethod

After evaluating a transaction, the runner must check if the result is a special request.

It uses sreq-dispatch to forward the result to the appropriate special request implementation, an "unknown" implementation if it looks like a special request but is not implemented, or the "nil" implementation if it is not a special request.

Implentations of special requests are in the [[convex.run.sreq]] namespace.

After evaluating a transaction, the runner must check if the result is a special request.

It uses [[sreq-dispatch]] to forward the result to the appropriate special request implementation, an "unknown"
implementation if it looks like a special request but is not implemented, or the "nil" implementation if it is not
a special request.

Implentations of special requests are in the [[convex.run.sreq]] namespace.
sourceraw docstring

sreq-dispatchclj

(sreq-dispatch result)
(sreq-dispatch _env result)

Dispatch function used by the sreq multimethod.

Returns nil if the given result is not a special request.

Dispatch function used by the [[sreq]] multimethod.

Returns nil if the given result is not a special request.
sourceraw docstring

trxclj

(trx env trx)

Evaluates trx and forwards result to sreq unless an error occured.

Evaluates `trx` and forwards result to [[sreq]] unless an error occured.
sourceraw docstring

trx+clj

(trx+ env)

Executes transactions located in $.trx/*list* in the context until that list becomes empty.

Executes transactions located in `$.trx/*list*` in the context until that list becomes empty.
sourceraw docstring

trx-trackclj

(trx-track env trx)

Similar to trx.

However, requests are not performed and juice consumption is tracked by going manually through expand, compile, and exec. Those are reported with the actual result in a map interned under $/*result*.

Similar to [[trx]].

However, requests are not performed and juice consumption is tracked by going manually through
[[expand]], [[compile]], and [[exec]]. Those are reported with the actual result in a map interned
under `$/*result*`.
sourceraw docstring

update-ctxclj

(update-ctx env kw-phase f trx)

Refills the current context with maximum juice and calls f with that context and trx.

The context is then reattached to env.

Refills the current context with maximum juice and calls `f` with that context and `trx`.

The context is then reattached to `env`.
sourceraw docstring

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

× close