What it does
The engine has a registry of named view definitions, each a kind, a group-by field and an aggregate, that can be refreshed from the current state and read back as buckets. Refresh is an explicit call that rescans the kind. The server never creates the registry or calls refresh, so this is a roadmap capability. The similarly named /v1/views routes are a different feature.
How it works
A view definition names the entity kind, one field to group by and an aggregate operation. A refresh loads every entity of the kind, buckets them by the field value (strings and numbers are used as keys, booleans become text, missing values go to a null bucket), aggregates each bucket and stores the buckets with the refresh time. Reads return the last refreshed buckets.
Nothing is incremental. A view reflects the data as of its last refresh, and registering a definition again replaces the old one.
The routes under /v1/views are the typed, versioned collection views that belong to the data model. They do not use this registry.
Where you reach it
- Library
ViewRegistry::register, refresh and get with ViewDef { name, kind, group_by_field, agg } (Rust engine API; not exposed by the server)
Limits
- Not reachable through any route, command or setting of the private-preview server.
- Refresh is manual and rescans the whole kind; there is no incremental maintenance on write.
- One group-by field per view, and the aggregate is computed over that same field.
- The registry is in memory and is not persisted.
Evidence
- Tests3 in-module tests cover register, refresh and read, refresh after new data, and lookup of an unknown view
Test coverage is listed as present in the engine repository at this edition. This page does not report test results.
KynetraDB is in private preview
This is not available in the preview. Request a preview to discuss the current scope.