Capability-driven safe entity retraction for Datahike.
Schema-on-read, in-process databases can store the named function. Strict
schema-on-write databases use an in-process :db.fn/call value and keep
their configuration unchanged. Remote writer transports are reported as
unsupported because arbitrary function values are not transport-safe.
Capability-driven safe entity retraction for Datahike. Schema-on-read, in-process databases can store the named function. Strict schema-on-write databases use an in-process `:db.fn/call` value and keep their configuration unchanged. Remote writer transports are reported as unsupported because arbitrary function values are not transport-safe.
(install! conn)Installs the named function when the current database supports that mode.
Direct mode is deliberately not reported as an installation: callers must
opt into prepare! plus retract-entity-tx-data, which keeps the function
value inside the in-process writer boundary.
Installs the named function when the current database supports that mode. Direct mode is deliberately not reported as an installation: callers must opt into `prepare!` plus `retract-entity-tx-data`, which keeps the function value inside the in-process writer boundary.
(installation-state db)(prepare! conn)Prepares the optional named/direct safe-retraction capability.
Returns the effective capability and installation state.
Prepares the optional named/direct safe-retraction capability. Returns the effective capability and installation state.
(retract-entity-direct-function db wrapped-target)Direct-call argument order avoids a Datahike attribute-ref parser edge:
the transaction parser examines the first user argument as if it were an
attribute before dispatching :db.fn/call. The envelope is non-numeric,
whereas a raw target eid commonly is numeric.
Direct-call argument order avoids a Datahike attribute-ref parser edge: the transaction parser examines the first user argument as if it were an attribute before dispatching `:db.fn/call`. The envelope is non-numeric, whereas a raw target eid commonly is numeric.
(retract-entity-function db target)(retract-entity-tx-data db target)Builds one named or direct invocation for the supplied database value.
Call prepare! on the connection first. The database argument makes mode
selection explicit and prevents a direct function value from accidentally
crossing a remote writer boundary.
Builds one named or direct invocation for the supplied database value. Call `prepare!` on the connection first. The database argument makes mode selection explicit and prevents a direct function value from accidentally crossing a remote writer boundary.
(support-descriptor db)Reports support from the actual database configuration.
This is deliberately capability-driven instead of a Datahike version test.
Reports support from the actual database configuration. This is deliberately capability-driven instead of a Datahike version test.
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 |