-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsqlc.yaml
More file actions
84 lines (84 loc) · 2.5 KB
/
Copy pathsqlc.yaml
File metadata and controls
84 lines (84 loc) · 2.5 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
version: "2"
sql:
- engine: "postgresql"
queries:
- "internal/auth/query.sql"
- "internal/content/query.sql"
- "internal/topic/query.sql"
- "internal/project/query.sql"
- "internal/feed/entry/query.sql"
- "internal/feed/query.sql"
- "internal/goal/query.sql"
- "internal/activity/query.sql"
- "internal/todo/query.sql"
- "internal/agent/query.sql"
- "internal/daily/query.sql"
- "internal/stats/query.sql"
schema: "migrations/"
gen:
go:
package: "db"
out: "internal/db"
sql_package: "pgx/v5"
emit_json_tags: true
emit_empty_slices: true
emit_pointers_for_null_types: true
overrides:
- db_type: "uuid"
go_type: "github.com/google/uuid.UUID"
- db_type: "uuid"
go_type:
import: "github.com/google/uuid"
type: "UUID"
pointer: true
nullable: true
- db_type: "timestamptz"
go_type:
type: "Time"
import: "time"
- db_type: "timestamptz"
go_type:
import: "time"
type: "Time"
pointer: true
nullable: true
- db_type: "date"
go_type:
type: "Time"
import: "time"
- db_type: "date"
go_type:
import: "time"
type: "Time"
pointer: true
nullable: true
- db_type: "pg_catalog.text[]"
go_type:
type: "[]string"
- db_type: "jsonb"
go_type:
type: "RawMessage"
import: "encoding/json"
- db_type: "jsonb"
go_type:
type: "RawMessage"
import: "encoding/json"
nullable: true
- db_type: "vector"
go_type:
import: "github.com/pgvector/pgvector-go"
type: "Vector"
- db_type: "vector"
go_type:
import: "github.com/pgvector/pgvector-go"
type: "Vector"
pointer: true
nullable: true
# tsvector GENERATED columns — never written from Go, map to string
- column: "contents.search_vector"
go_type: "string"
# non-nullable JSONB → json.RawMessage
- column: "feeds.filter_config"
go_type:
import: "encoding/json"
type: "RawMessage"