frm/sqlc.yaml
Adriano Caloiaro caa95c66b6
initial commit
2024-12-16 17:01:53 -07:00

53 lines
1.3 KiB
YAML

version: 2
overrides:
go:
overrides:
- db_type: uuid
nullable: true
go_type:
import: github.com/google/uuid
package: uuid
type: UUID
#
# Note migrations must use `timestamptz` instead of `timestamp with time zone` due to https://github.com/sqlc-dev/sqlc/issues/2630
#
- db_type: timestamptz
engine: postgresql
go_type:
import: time
type: Time
- db_type: timestamptz
nullable: true
engine: postgresql
go_type:
import: gopkg.in/guregu/null.v4
package: null
type: Time
- db_type: pg_catalog.interval
engine: postgresql
go_type:
import: time
type: Duration
- column: forms.fields
go_type:
import: github.com/acaloiaro/frm/types
type: FormFields
- column: forms.workspace_id
go_type:
import: github.com/google/uuid
package: uuid
type: UUID
sql:
- engine: postgresql
queries: db/queries.sql
schema: db/migrations
gen:
go:
package: internal
out: ./internal
sql_package: pgx/v5
emit_pointers_for_null_types: true
emit_exported_queries: false
emit_json_tags: true
emit_sql_as_comment: true