Datalevin database adapter for Fulcro RAD.
This namespace provides the main public API by re-exporting functions from the modular sub-namespaces. Import this namespace and use its functions to work with the Datalevin adapter.
Main functions:
Datalevin database adapter for Fulcro RAD. This namespace provides the main public API by re-exporting functions from the modular sub-namespaces. Import this namespace and use its functions to work with the Datalevin adapter. Main functions: - start-databases: Start database connections - stop-databases: Stop database connections - pathom-plugin: Create a Pathom3 plugin for database access - generate-resolvers: Generate automatic resolvers for RAD attributes - wrap-datalevin-save: Middleware for saving forms - wrap-datalevin-delete: Middleware for deleting entities - automatic-schema: Generate Datalevin schema from RAD attributes
Append native Datalevin transaction forms (e.g. [:db/ensure ...]
post-conditions) to a save env. See wrap-datalevin-save/append-to-raw-txn.
Append native Datalevin transaction forms (e.g. `[:db/ensure ...]` post-conditions) to a save env. See wrap-datalevin-save/append-to-raw-txn.
Convert Datalevin result with :db/id to Pathom result with proper ID key.
Convert Datalevin result with :db/id to Pathom result with proper ID key.
Convert RAD form delta to Datalevin transaction data.
Arguments:
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.
Generate all of the resolvers that make sense for the given database config.
Arguments:
Returns Pathom-2-shape resolver maps (plain data). These work directly in a
Pathom 2 parser and are auto-converted by RAD's Pathom 3 processor
(new-processor runs convert-resolvers). No hard pathom dependency is
required to build them. See generate-resolvers-pathom3 for native P3 records.
Generate all of the resolvers that make sense for the given database config. Arguments: - attributes: collection of RAD attributes - schema: schema keyword (e.g., :main) Returns Pathom-2-shape resolver maps (plain data). These work directly in a Pathom 2 parser and are auto-converted by RAD's Pathom 3 processor (`new-processor` runs `convert-resolvers`). No hard pathom dependency is required to build them. See generate-resolvers-pathom3 for native P3 records.
Like generate-resolvers, but returns native Pathom 3 resolver records.
Requires pathom3 on the classpath at call time (resolved lazily). Use only
when building a Pathom 3 index directly rather than via RAD's new-processor.
Like `generate-resolvers`, but returns native Pathom 3 resolver records. Requires pathom3 on the classpath at call time (resolved lazily). Use only when building a Pathom 3 index directly rather than via RAD's new-processor.
Returns true if the given attribute uses native :db/id.
Returns true if the given attribute uses native :db/id.
Pathom 2 plugin that injects Datalevin connections/databases into the parse
env. For Pathom 3, use wrap-env instead. See datalevin.pathom-plugin.
Pathom 2 plugin that injects Datalevin connections/databases into the parse env. For Pathom 3, use `wrap-env` instead. See datalevin.pathom-plugin.
Convert a Pathom EQL query to a Datalevin pull pattern. Replaces native-id identity attributes with :db/id.
Convert a Pathom EQL query to a Datalevin pull pattern. Replaces native-id identity attributes with :db/id.
Return a seq of problems comparing the RAD-derived expected schema against the live Datalevin schema of a connection. See start-databases/schema-problems.
Return a seq of problems comparing the RAD-derived expected schema against the live Datalevin schema of a connection. See start-databases/schema-problems.
Throw when the live Datalevin schema does not satisfy the RAD-derived expected schema; returns true otherwise. See start-databases/verify-schema!.
Throw when the live Datalevin schema does not satisfy the RAD-derived expected schema; returns true otherwise. See start-databases/verify-schema!.
Plain (fn [env] env') that adds Datalevin connections/databases to the env.
This is the Pathom 3 integration point (compose into env-middleware); it also
underlies the Pathom 2 pathom-plugin. See datalevin.pathom-plugin.
Plain `(fn [env] env')` that adds Datalevin connections/databases to the env. This is the Pathom 3 integration point (compose into env-middleware); it also underlies the Pathom 2 `pathom-plugin`. See datalevin.pathom-plugin.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |