stillbox/sql/sqlc.yaml
2024-07-27 19:25:16 -04:00

29 lines
839 B
YAML

version: "2"
sql:
- engine: "postgresql"
queries: "postgres/queries"
schema: "postgres/migrations"
gen:
go:
package: "database"
out: "../pkg/gordio/database"
sql_package: "pgx/v5"
query_parameter_limit: 3
emit_json_tags: true
emit_interface: true
emit_pointers_for_null_types: true
overrides:
- db_type: "uuid"
go_type:
import: "github.com/google/uuid"
type: "UUID"
- db_type: "pg_catalog.int4"
go_type: "int"
- db_type: "pg_catalog.serial4"
go_type: "int"
- db_type: "integer"
go_type: "int"
- db_type: "pg_catalog.timestamp"
go_type: "time.Time"
- db_type: "pg_catalog.text"
go_type: "string"