Re-exports§
pub use backend_trait::CodegenBackend;pub use backend_trait::RbsEnumInfo;pub use backend_trait::RbsGenerationContext;pub use backend_trait::RbsQueryInfo;pub use backend_trait::ResolvedColumn;pub use backend_trait::ResolvedParam;pub use backends::get_backend;pub use overrides::TypeOverride;
Modules§
- backend_
options - backend_
trait - backends
- overrides
- provenance
- The provenance header line every generated file carries, and the exact byte ordering it sits in.
- resolve
- sql_
literal - Escape SQL text for safe splicing into a target-language string literal.
- validation
Structs§
- Generated
Code - Nested
Struct Def - One rendered nested-aggregate struct definition, paired with the name it declares so file writers can deduplicate.
- Nested
Struct Degradation - One nested-aggregate column
degrade_unsupported_nested_structsrewrote to a scalar JSON fallback becausebackendcould not construct a real struct for it. SeeGeneratedCode::degraded_nested_structsfor why this is surfaced at all rather than left as an internal rewrite (GH #147).
Functions§
- degrade_
unsupported_ nested_ structs - generate
- Backward-compatible: generate code using the default sqlx backend.
- generate_
single_ enum_ def - Backward-compatible: generate a single enum definition (sqlx backend). Uses the manifest directly for backward compatibility with existing callers.
- generate_
single_ enum_ def_ with_ backend - Generate a single enum definition using a specific backend.
- generate_
with_ backend - Generate code using a specific backend.
- generate_
with_ backend_ and_ overrides - Generate code using a specific backend with type overrides.
- generate_
with_ backend_ and_ overrides_ and_ nested_ composites - Generate code while promoting the named composites to their nested-capable form.
- get_
manifest_ for_ backend - Get the manifest for a backend. Defaults to PostgreSQL engine.
- load_
or_ default_ manifest - Backward-compatible: load the default sqlx manifest.
- model_
struct_ name - The type name a
SELECT *model is declared under and referenced by. - nested_
type_ is_ emitted - Whether
sql_nameis reachable from a nested-aggregate struct the backend actually emitted a definition for. - singularize
- Simple singularization: remove trailing ‘s’.
Type Aliases§
- Degraded
Nested Structs - Degradation pass for nested-aggregate columns (
json_agg(o.*),row_to_json(u.*)). Must run beforeresolve::resolve_columns– every caller that resolvesAnalyzedColumns into a backend’s types needs this, not justgenerate_with_backend_and_overrides:scythe-cli’s RBS signature generation (generate_rbs_if_supported) callsresolve::resolve_columnsdirectly on a second, independent path, so it must run this pass too or it silently bypasses the byte-identity guarantee for any backend that hasn’t opted in.