Skip to main content

Crate corium_db

Crate corium_db 

Source
Expand description

Immutable database values: time views, covering-index access, naming, per-attribute statistics, and bootstrap metadata.

A Db is a value: cheap to clone, never mutated in place. Time views (Db::as_of, Db::since, Db::history) wrap the same recorded datoms with a different fold policy — no copying of facts. The four covering indexes for a view are materialized lazily on first read and shared by every clone of that value.

Structs§

AttrStats
Per-attribute statistics driving planner selectivity estimates.
Db
An immutable value of a database at one basis transaction and time view.
DbStats
Counts over one database view.
Idents
Registry of :db/ident names for entities (attributes chiefly).
PlannerStats
Whole-view statistics for the query planner.

Enums§

DbView
Time-view selector for a database value (see docs/design/time-model.md).

Constants§

FIRST_USER_ID
The first user-assignable sequence number. Lower ids are reserved for bootstrap data.

Functions§

attribute
Convenience constructor for schema attributes used during bootstrap/tests.
avet_covered
Whether the attribute participates in the AVET covering index.
key_prefix
Builds the encoded key prefix for a partial datom in one index order.