The generated API is intentionally small:
- a `const SQL`
- row structs for `:one` and `:many`
- params structs when a query has multiple parameters
- methods on `Queries<E>` that work with `&PgPool`, `&mut PgConnection`, or `&mut Transaction`
Current scope is PostgreSQL. It supports the usual `sqlc` query annotations, plus enums, composite types, batch queries, `COPY FROM`, `sqlc.slice()`, `sqlc.embed()`, and type overrides.
leeknoww•1h ago
jrandolf•1h ago
Tip: you can use case statements and etc. to create static queries even when you have conditionals.
Also, read https://news.ycombinator.com/newsguidelines.html#generated