QueryStorageAdapter

A storage's port into the Catalog: it reports what its native structures (indexes, mappings, validators) prove about a logical model, and nothing else. The Catalog merges the model's sources and compiles the reported facts into the model's schema, applying every rule that does not depend on the storage.

An adapter walks LogicalQuerySchema.values, and for each logical path its storage can serve it reports the capabilities it can execute and where each is stored (QueryValueBindings), with the storage's model-wide StorageSupport, through QueryStorageFacts.build. It reports nothing it cannot run correctly: a capability left out is refused at admission, never run wrong. QueryValueSchema.storageFamilies says which storage families a logical value needs for a capability, so an adapter only maps its native types to those families.

Functions

Link copied to clipboard
abstract suspend fun facts(logicalSchema: LogicalQuerySchema): QueryStorageFacts

The storage's facts about logicalSchema, from its current native structures.

Link copied to clipboard
open suspend fun refresh(logicalSchema: LogicalQuerySchema): QueryStorageFacts

The storage's facts about logicalSchema, reloading native structures it caches.