sqlc

command
v0.120.9 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

extract-enums moves the enum types that sqlc.yaml overrides to pkg/enums out of the generated models.go and into pkg/enums/enums.gen.go, so each enum has exactly one Go type shared by the repository, API and client layers. It then generates the API-facing subsets of those enums declared in pkg/enums/subsets.yaml.

Run from the repo root after sqlc generation:

go run ./hack/sqlc/extract-enums.go

Jump to

Keyboard shortcuts

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