Documentation
¶
Overview ¶
Command sqlc-gen performs post-processing on sqlc-generated code to enable a unified database layer that works with both SQLite and PostgreSQL.
This tool is run automatically as part of `make sqlc-gen` after `sqlc generate`. It performs three steps:
- Normalize struct field order (PostgreSQL → SQLite order)
- Generate unified type aliases (types.go)
- Generate unified Querier wrapper (querier_gen.go)
Usage:
go run cmd/sqlc-gen/main.go
Or via make:
make sqlc-gen
Click to show internal directories.
Click to hide internal directories.