Liking cljdoc? Tell your friends :D

us.whitford.fulcro.rad.database-adapters.datalevin.wrap-datalevin-save

Save form middleware for Datalevin database adapter.

Save form middleware for Datalevin database adapter.
raw docstring

append-to-raw-txnclj

(append-to-raw-txn env forms)

Append native Datalevin transaction forms to the save environment.

forms is a sequential collection of raw Datalevin transaction operations (e.g. [[:db/ensuremy.ns/open? "acct"]]`) that will be appended to the generated transaction for each affected schema during the save.

Intended for use by save middleware wrapping wrap-datalevin-save: modify the env before delegating to the datalevin save handler. See dlo/raw-txn.

NOTE: In a multi-schema save the forms are appended to each schema's transaction; reference entities that exist within a single schema.

Append native Datalevin transaction forms to the save environment.

`forms` is a sequential collection of raw Datalevin transaction operations
(e.g. `[[:db/ensure `my.ns/open? "acct"]]`) that will be appended to the
generated transaction for each affected schema during the save.

Intended for use by save middleware wrapping `wrap-datalevin-save`: modify the
env before delegating to the datalevin save handler. See `dlo/raw-txn`.

NOTE: In a multi-schema save the forms are appended to each schema's
transaction; reference entities that exist within a single schema.
sourceraw docstring

delta->txnclj

(delta->txn env delta)

Convert RAD form delta to Datalevin transaction data.

Arguments:

  • env: environment map with ::attr/key->attribute
  • delta: RAD form delta map

Returns vector of Datalevin transaction operations.

Convert RAD form delta to Datalevin transaction data.

Arguments:
- env: environment map with ::attr/key->attribute
- delta: RAD form delta map

Returns vector of Datalevin transaction operations.
sourceraw docstring

keys-in-deltaclj

(keys-in-delta delta)

Extract all keys from delta

Extract all keys from delta
sourceraw docstring

save-form!clj

(save-form! env {:com.fulcrologic.rad.form/keys [delta]})

Do all of the possible datalevin operations for the given form delta (save to all datalevin databases involved).

Any native Datalevin transaction forms accumulated under dlo/raw-txn in the env (e.g. [:db/ensure ...] post-conditions) are appended to each affected schema's transaction. See append-to-raw-txn.

Do all of the possible datalevin operations for the given form delta (save to all datalevin databases involved).

Any native Datalevin transaction forms accumulated under `dlo/raw-txn` in the
env (e.g. `[:db/ensure ...]` post-conditions) are appended to each affected
schema's transaction. See `append-to-raw-txn`.
sourceraw docstring

schemas-for-deltaclj

(schemas-for-delta {:com.fulcrologic.rad.attributes/keys [key->attribute]}
                   delta)

Extract all schemas referenced in delta

Extract all schemas referenced in delta
sourceraw docstring

tempid->result-idclj

(tempid->result-id tx-result delta)

Extract the mapping from tempids to real ids from transaction result.

Extract the mapping from tempids to real ids from transaction result.
sourceraw docstring

wrap-datalevin-saveclj

(wrap-datalevin-save)
(wrap-datalevin-save handler)

Form save middleware to accomplish datalevin saves.

Form save middleware to accomplish datalevin saves.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close