-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsqlc.yaml
28 lines (28 loc) · 849 Bytes
/
sqlc.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
version: "2"
sql:
- engine: postgresql
schema: db/schema.sql
queries: db/query.sql
gen:
go:
package: auth_db
sql_package: pgx/v5
out: internal/gen/db
emit_prepared_queries: true
overrides:
- db_type: "uuid"
go_type: "github.com/google/uuid.UUID"
- db_type: "uuid"
go_type: "github.com/google/uuid.NullUUID"
nullable: true
- db_type: "pg_catalog.interval"
go_type: "time.Duration"
- db_type: "pg_catalog.interval"
# It could be the simpler `go_type: "*time.Duration"`, but that outputs double points `**time.Duration`.
go_type:
import: "time"
type: "Duration"
pointer: true
nullable: true
rules:
- sqlc/db-prepare