-
Notifications
You must be signed in to change notification settings - Fork 0
/
sqlc.yaml
56 lines (48 loc) · 1.56 KB
/
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
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
version: 2
sql:
- engine: "postgresql"
schema: "schema.sql"
queries: "./queries/"
gen:
go:
sql_package: "pgx/v5"
out: "query"
package: "query"
overrides:
# for some reason we sometimes need the catalog prefix and sometimes not although docs say we should always use it
- db_type: "pg_catalog.bool"
go_type: "database/sql.NullBool"
nullable: true
- db_type: "bool"
go_type: "database/sql.NullBool"
nullable: true
- db_type: "int8"
go_type: "database/sql.NullInt64"
nullable: true
- db_type: "pg_catalog.int8"
go_type: "database/sql.NullInt64"
nullable: true
- db_type: "int2"
go_type: "database/sql.NullInt16"
nullable: true
- db_type: "pg_catalog.int2"
go_type: "database/sql.NullInt16"
nullable: true
- db_type: "float4"
go_type: "database/sql.NullFloat64"
nullable: true
- db_type: "float8"
go_type: "database/sql.NullFloat64"
nullable: true
- db_type: "text"
go_type: "database/sql.NullString"
nullable: true
- db_type: "timestamptz"
go_type: "database/sql.NullTime"
nullable: true
- db_type: "timestamptz"
go_type: "time.Time"
nullable: false
- db_type: "timestamptz"
go_type: "database/sql.NullTime"
nullable: false