Reference

Generator Workflow (Deep Dive)

Technical details for snapshot, build, and artefact layout—bundled for anyone optimising beyond the quickstart.

Why this page?

Getting-started guides stay short. This page carries the technical tooling for automating snapshots, tuning builds, or packaging artefacts.

Snapshot

  • xtraq snapshot reads stored procedures, table types, functions, and UDTs and writes JSON snapshots to .xtraq/snapshots/.
  • Connection: XTRAQ_GENERATOR_DB from .env/environment or --connection.
  • Snapshots are trackable; the cache under .xtraq/cache stays local.

Build

  • xtraq build consumes snapshots and writes generated C# artefacts to Xtraq/ (default).
  • XTRAQ_OUTPUT_DIR or --output change the target folder.
  • Entity Framework and API integrations are emitted only when the matching config is set (EntityFramework.Enabled, Api node).

One-shot

  • xtraq without a subcommand runs snapshot + build in one go. Ideal for local iterations and simple CI jobs.

Artefact layout (default)

  • Xtraq/ – generated code (DbContext, pipelines, DTOs, table types, policies)
  • .xtraq/snapshots/ – DB metadata (trackable)
  • .xtraq/cache/ – local snapshot cache (do not track)

CI/CD notes

  • Set XTRAQ_GENERATOR_DB via the pipeline secret store.
  • Use xtraq (or snapshot + build) as separate steps if you publish snapshot artefacts as build outputs.
  • The output folder can be cleared before a build; artefacts are deterministic.

Next steps