sqlc-gen

command
v0.0.0-...-3e83256 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 13, 2026 License: MIT Imports: 12 Imported by: 0

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:

  1. Normalize struct field order (PostgreSQL → SQLite order)
  2. Generate unified type aliases (types.go)
  3. Generate unified Querier wrapper (querier_gen.go)

Usage:

go run cmd/sqlc-gen/main.go

Or via make:

make sqlc-gen

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL