-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsqlc.yaml
More file actions
31 lines (31 loc) · 1.35 KB
/
Copy pathsqlc.yaml
File metadata and controls
31 lines (31 loc) · 1.35 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
version: "2"
sql:
- engine: "postgresql"
schema: "migrations"
queries: "internal/db/queries"
gen:
go:
package: "db"
out: "internal/db"
sql_package: "pgx/v5"
emit_json_tags: true
emit_interface: true
emit_empty_slices: true
rename:
# Go initialism: column "url" -> field URL (not Url). JSON tag stays "url".
url: "URL"
overrides:
# Read jobs.enrichment as json.RawMessage, not []byte. RawMessage keeps
# the JSONB blob as raw bytes that marshal straight through to the API
# response (an empty payload stays {}); a plain []byte would base64-encode.
- column: "jobs.enrichment"
go_type: "encoding/json.RawMessage"
# Same reasoning for the company-info extras JSONB: raw bytes marshal
# straight through to the company-detail response ({} stays {}), not base64.
- column: "companies.company_info"
go_type: "encoding/json.RawMessage"
# The profile location block: raw JSON round-trips whole. The service
# marshals a validated, normalized block (or NULL for none), and the stored
# bytes marshal straight through to the profile response (null stays null).
- column: "user_profiles.location_preferences"
go_type: "encoding/json.RawMessage"