-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathsqlc.yaml
More file actions
67 lines (64 loc) · 1.89 KB
/
sqlc.yaml
File metadata and controls
67 lines (64 loc) · 1.89 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
version: "2"
sql:
- schema:
- "./database/migrations/"
- "./database/sqlc-schemas/"
queries: "./database/queries/"
engine: "postgresql"
gen:
go:
out: "./internal/db/sqlc/"
package: "sqlc"
emit_json_tags: true
emit_prepared_queries: false
emit_interface: true
emit_exact_table_names: false
emit_empty_slices: true
sql_package: "pgx/v5"
overrides:
# UUID types
- db_type: "uuid"
go_type:
import: "github.com/google/uuid"
type: "UUID"
- db_type: "uuid"
nullable: true
go_type:
import: "github.com/google/uuid"
type: "UUID"
# Time types
- db_type: "pg_catalog.timestamp"
go_type: "time.Time"
- db_type: "pg_catalog.timestamp"
nullable: true
go_type:
import: "time"
type: "Time"
pointer: true
- db_type: "pg_catalog.timestamptz"
go_type: "time.Time"
- db_type: "pg_catalog.timestamptz"
nullable: true
go_type:
import: "time"
type: "Time"
pointer: true
# Text types
- db_type: "text"
go_type:
type: "string"
- db_type: "text"
nullable: true
go_type:
type: "string"
pointer: true
# Interval types
- db_type: "pg_catalog.interval"
go_type:
import: "github.com/stacklok/toolhive-registry-server/internal/db/pgtypes"
type: "Interval"
- db_type: "pg_catalog.interval"
nullable: true
go_type:
import: "github.com/stacklok/toolhive-registry-server/internal/db/pgtypes"
type: "Interval"