Expand description
System-label persistence backends for CustomPlugin.
Per proposal §9.7, declarations made via uni.plugin.declareFunction
/ declareProcedure / declareAggregate / declareTrigger
survive restart by living in a host-owned system label
_DeclaredPlugin.
This module ships SystemLabelPersistence — the
uni_plugin_custom::Persistence backend that the host’s
Uni::build flow installs by default. The backend persists
declarations under <data_path>/_system/declared_plugins.json
using the atomic write-then-rename pattern from
uni_plugin_custom::JsonFilePersistence. The path is reserved
under the database’s directory tree so backup / restore tooling
picks up declarations alongside graph data, and the
uni_plugin_custom::DeclaredPlugin serde shape is identical to
the _DeclaredPlugin system-label record (proposal §9.7), so the
eventual cutover to Cypher-MERGE-through-execute_inner_query
(M11 deliverable #8 follow-up) is a backend swap rather than a
schema migration.
The name and module placement (uni-db, not uni-plugin-custom)
mark the layering: SystemLabelPersistence belongs at the host
layer because the cutover-eventual implementation needs
QueryProcedureHost (from uni-query), which uni-plugin-custom
does not depend on.
Structs§
- Lazy
Cypher Sink - Lazy bridge from a
Persistencebackend to the host’s write-mode Cypher executor. - System
Label Persistence - Persistence backend for the host’s declared-plugin records.
Functions§
- persistence_
for_ data_ path - Choose the appropriate persistence backend for a
Uniinstance.