stillbox/sql/sqlc.yaml
2024-11-19 10:18:12 -05:00

39 lines
1.1 KiB
YAML

version: "2"
sql:
- engine: "postgresql"
queries: "postgres/queries"
schema: "postgres/migrations"
gen:
go:
package: "database"
out: "../pkg/database"
sql_package: "pgx/v5"
query_parameter_limit: 3
emit_json_tags: true
emit_interface: true
initialisms:
- id
- tgid
- tg
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.timestamp"
go_type: "time.Time"
- db_type: "pg_catalog.text"
go_type: "string"
- column: "talkgroups.alert_config"
go_type:
import: "dynatron.me/x/stillbox/pkg/alerting/rules"
type: "AlertRules"
nullable: true
- column: "talkgroups.metadata"
go_type:
import: "dynatron.me/x/stillbox/internal/jsontypes"
type: "Metadata"
nullable: true