LineageSchema

The node labels the lineage record stores write, and the natural key each one is upserted on, as plain data.

Three things read this and have to agree. DrivineProjectionRecordStore and DrivineCollectorRecordStore build their MERGE patterns from mergePattern, so a record is always upserted on the key named here. A host, and the integration-test harness, registers this object as a DiceStorageSchema bean, which is what makes those MERGEs race-free: a MERGE on an unconstrained key lets concurrent writers all miss the match, all create, and fill the lineage table with duplicates. The same registration tells DiceOwnedSchema which (:ProjectionRecord) and (:CollectorRecord) nodes in a graph are dice's own.

Keeping all three off one map is what stops them drifting apart. A key that appears in a store's Cypher and nowhere else can lose its constraint, or stop matching the shape an observation recognises, with nothing failing to say so.

Properties

Link copied to clipboard

Relationship types this store writes between its own nodes. A whole-graph observation hides them, on the same grounds it hides the node labels: they are dice's bookkeeping, and no declared domain schema is expected to mention them.

Link copied to clipboard

One node per collector decision about a proposition.

Link copied to clipboard

One node per collector run.

Link copied to clipboard

Every node label the lineage stores write, for test cleanup and for drift exclusion.

Link copied to clipboard

The properties each record is keyed on: the values that decide whether a write updates an existing node or creates one.

Link copied to clipboard

One node per projection outcome.

Functions

Link copied to clipboard
fun mergePattern(alias: String, label: String): String

The (alias:Label {property: $property, ...}) pattern a store MERGEs on.

Link copied to clipboard
open override fun specs(): List<<Error class: unknown class>>

A uniqueness constraint per natural key, which is what makes the stores' MERGEs race-free, plus the range indexes the lineage reads look records up by.