-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsqlc.yaml
50 lines (49 loc) · 1.38 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
version: "2"
sql:
- engine: "postgresql"
queries: [
"queries/active_servers.sql",
"queries/channel.sql",
"queries/flag_mappings.sql",
"queries/flags.sql",
"queries/guild.sql",
"queries/player_count_notification_messages.sql",
"queries/player_count_notification_request.sql",
"queries/prev_active_servers.sql",
"queries/tracking.sql"
]
schema: [
"migrations/001_schema.sql",
"migrations/003_schema.sql",
"migrations/004_schema.sql",
]
gen:
go:
sql_package: "pgx/v5"
package: "sqlc"
out: "sqlc"
overrides: # test why the builtin postgresql types are not mapped correctly
- db_type: "scorekind"
go_type:
type: "string"
- db_type: "TIMESTAMPTZ"
go_type:
import: "time"
type: "Time"
- db_type: "TIMESTAMP"
go_type:
import: "time"
type: "Time"
- db_type: "INTEGER"
go_type:
type: "int"
- db_type: "jsonb"
go_type:
import: "encoding/json"
type: "RawMessage"
emit_db_tags: true
emit_prepared_queries: true
emit_empty_slices: true
emit_enum_valid_method: true
emit_pointers_for_null_types: true
emit_all_enum_values: true