Skip to Content
fusion-orm
Core Concepts

Core concepts

The DB session model, the Statement and its clause registry, Config, and per-call sessions.

Everything in fusion-orm flows through a few small, sharply-defined types:

  • *DB — a session handle. The root instance from Open, or a derivative produced by chaining, Session, WithContext, Debug, or Begin. Copy-on-write all the way down.
  • Statement — the per-chain state: clauses, model, destination, vars, plugin settings, and a typed 16-slot clause registry with a canonical build order.
  • Config — session-wide settings, copied (never shared) onto every derivative, so session flags cannot leak back to the root.
  • Session / WithContext / Debug — the per-call dials you turn on a derivative: dry-run mode, context cancellation, verbose logging, and friends.

Start with the session if you're new — every other piece is reached through it.