Skip to main content

run_schema_apply_memory_identity

Function run_schema_apply_memory_identity 

Source
pub fn run_schema_apply_memory_identity(
    db_dir: &Path,
) -> Result<String, CliError>
Expand description

mushroomdb schema apply <db> --memory-identity

Applies core_api::memory_schema::memory_identity() — opt-in, because a store never gains a rule silently. What it will do is measured and stated first, in the same output, before anything is written: how many entity nodes the rules will compare, and how many need an aliases list written before they can. Then the lists are written in one commit and the rules created, each with its own backfill.

aliases is what a node’s key and name imply. A node that already carries items those do not imply — a user’s own aliases property from before 0.7 — keeps them: the same commit moves them to alias_keys, the list the five claim rules read, and the output says how many nodes that touched. Nothing is dropped. On a store that already carries the preset’s earlier eleven rules, this adds the five claim rules and leaves the rest unchanged.