DatabaseEngine
In one line: the root object — one per process — that owns everything and hands you transactions, queries, and the schema.
DatabaseEngine.Open("skirmish.typhon", o => o.Register<Position>()…) is the one-line setup: it names the on-disk database and registers your components — your archetypes self-register at assembly load — running any schema migration first, and returns a ready-to-use engine. using var flushes dirty pages and releases the file lock at scope end. Build it once at startup and hand it around.
Under the hood the engine is a composition of independently-configurable subsystems — page cache, allocator, WAL, timers — tuned through DatabaseEngineOptions (or services.AddTyphon(…) in a DI app). You declare the envelope; it self-manages the rest.
How it relates
- Transaction / Unit of Work — created from the engine.
- Page cache / WAL & checkpoint — subsystems it owns and budgets.
- Schema evolution — migration runs during
Open. - Runtime — built on top of an engine to run systems.
In the API
DatabaseEngine—Open/Register<T>/CreateQuickTransaction/CreateUnitOfWork.DatabaseEngineOptions— configuration (Resources,Wal,Configure*).
Learn & use
- Narrative: Guide ch.1 §3 — open the engine · ch.6 — operating
- Feature detail: hosting · engine options configuration