minireader/sqlc.yaml
2024-08-10 11:01:50 +07:00

33 lines
955 B
YAML

version: "2"
sql:
- engine: "postgresql"
queries: "internal/minireader/repositories/sql/query.sql"
schema: "migrations"
gen:
go:
package: "sql"
sql_package: "pgx/v5"
out: "internal/minireader/repositories/sql"
emit_empty_slices: true
rename:
uid: UID
overrides:
# common types
- db_type: "timestamptz"
nullable: true
engine: "postgresql"
go_type:
import: "gopkg.in/guregu/null.v4"
package: "null"
type: "Time"
- db_type: "uuid"
engine: "postgresql"
go_type: "github.com/google/uuid.UUID"
- db_type: "integer"
engine: "postgresql"
go_type: "int"
# application-specific types
- db_type: "feed_provider"
engine: "postgresql"
go_type: "borodyadka.dev/borodyadka/minireader/internal/minireader/dto.Provider"