Across the 10 supported languages and 10 database engines, scythe exposes 56 selectable backend names implemented by 52 CodegenBackend instances (some backends share an implementation across closely related drivers).
Provenance header#
Every generated file carries a one-line provenance comment right after the file preamble:
// scythe:provenance v=0.15.0 backend=csharp-npgsql engine=postgresql schema=sch1:2e813606acee8b51 queries=q1:9c4e1f77a0b3d582
The comment token varies by language — # for Python, Ruby, and Elixir; // for most others; PHP places it after the opening <?php tag. scythe check compares this header against your current schema and queries to catch stale generated files — see the SC-PRV* rules in the lint rule reference.
Coverage limitations#
Not every backend supports every database engine:
java-r2dbcandkotlin-r2dbcsupport only PostgreSQL/CockroachDB, MySQL, MariaDB, and SQLite.elixir-ectoandkotlin-exposedcover PostgreSQL/CockroachDB only.php-amphpcovers PostgreSQL/CockroachDB, MySQL, and MariaDB only.php-pdohas no Oracle support, despite having a manifest for the other engines.
Check Configuration for the full target list per language, and Database Support for engine-level feature coverage.
Adding a new backend#
Backends aren't limited to the built-in set structurally — adding one is a three-step process: write a manifest TOML with type mappings, implement the CodegenBackend trait (row structs, query functions, enums, composites, with optional overrides for grouped queries and custom options), and register it in the get_backend function.
Related#
- Python Backend — a full worked example of one backend's generated output.
- Neutral Type Reference — the intermediate types every manifest maps from.