Skip to main content

Module memory_schema

Module memory_schema 

Source
Expand description

The schema a memory store is created with.

recall searches the pairs fulltext_pairs() reports, and until 0.7 the only pair any memory store ever had was Note.text, self-declared by remember. So recall could return notes and never the entities they were about. This module is the answer: one Schema value, applied once at creation, expressed entirely in types that already exist.

It is deliberately not applied to an existing store on open. Declaring full-text rebuilds the index at open — measured at 227 ms against 3.8 ms with none (ledger row 36) — and creating a rule fires a backfill across every node. An existing store is upgraded only by an explicit mushroomdb schema apply --memory-defaults.

Constants§

MEMORY_ENTITY_LABELS
Labels the memory surface treats as entities.
NAME_FIELD
The field each entity label carries its human-readable name in.
PROVISIONAL_LABEL
The label a provisional subject is created under by remember.
PROVISIONAL_PROP
The property marking a node as provisional — a subject named before it was described. Never removed silently; see the spec’s O-4.

Functions§

memory_defaults
The default schema a memory store is created with.
memory_identity
The identity preset: SAME_AS rules over the aliases list, and over the declared alias_keys list.