Expand description
Event replay → SQLite projection pipeline.
The Projector replays events from the TSJSON event log and upserts
the resulting state into the SQLite projection database. It handles all
11 event types and supports both incremental (single-event) and full
rebuild modes.
§Deduplication
Events are deduplicated by event_hash. When a duplicate hash is
encountered (e.g. from git merge duplicating lines in shard files),
the event is silently skipped.
§Cursor
After projecting a batch, the caller can persist the byte offset and
last event hash via super::query::update_projection_cursor for
incremental replay on next startup.
Structs§
- Projection
Stats - Statistics returned after a projection run.
- Projector
- Replays events into the
SQLiteprojection.
Constants§
- PROJECTED_
EVENTS_ DDL - SQL to create the
projected_eventstracking table.
Functions§
- clear_
projection - Drop all projection data for a full rebuild.
- ensure_
tracking_ table - Ensure the
projected_eventstracking table exists.