Repository navigation
Expand file tree
/
Copy pathsqlc.yaml
More file actions
106 lines (106 loc) · 3.39 KB
/
Copy pathsqlc.yaml
File metadata and controls
106 lines (106 loc) · 3.39 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
version: "2"
sql:
- engine: "postgresql"
queries: "internal/postgres/queries"
schema:
- "internal/postgres/schema"
- "internal/postgres/migrations"
gen:
go:
package: "db"
out: "internal/postgres/db"
sql_package: "pgx/v5"
rename:
core_medium: "CoreMedia"
overrides:
- column: "core.media.sizes"
go_type:
import: "github.com/gopherium/gophenberg/internal/media"
type: "Sizes"
- column: "core.content.fields"
go_type:
import: "github.com/gopherium/gophenberg/internal/content"
type: "Values"
- column: "core.content_revisions.fields"
go_type:
import: "github.com/gopherium/gophenberg/internal/content"
type: "Values"
- 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"
pointer: true
- db_type: "timestamptz"
go_type: "time.Time"
- db_type: "timestamptz"
nullable: true
go_type:
type: "time.Time"
pointer: true
- db_type: "text"
nullable: true
go_type:
type: "string"
pointer: true
- engine: "sqlite"
queries: "internal/sqlite/queries"
schema:
- "internal/sqlite/schema"
- "internal/sqlite/migrations"
gen:
go:
package: "db"
out: "internal/sqlite/db"
emit_exported_queries: true
emit_pointers_for_null_types: true
rename:
core_medium: "CoreMedia"
overrides:
- column: "core_media.author_id"
go_type:
import: "github.com/google/uuid"
type: "UUID"
- column: "core_user_settings.user_id"
go_type:
import: "github.com/google/uuid"
type: "UUID"
- column: "auth_users.id"
go_type:
import: "github.com/google/uuid"
type: "UUID"
- column: "core_media.created_at"
go_type:
import: "github.com/gopherium/framework/dbkit"
type: "Time"
- column: "core_media.updated_at"
go_type:
import: "github.com/gopherium/framework/dbkit"
type: "Time"
- column: "core_cron_jobs.next_run_at"
go_type:
import: "github.com/gopherium/framework/dbkit"
type: "Time"
- column: "core_cron_jobs.leased_until"
go_type:
import: "github.com/gopherium/framework/dbkit"
type: "Time"
pointer: true
- column: "core_cron_jobs.last_started_at"
go_type:
import: "github.com/gopherium/framework/dbkit"
type: "Time"
pointer: true
- column: "core_cron_jobs.last_finished_at"
go_type:
import: "github.com/gopherium/framework/dbkit"
type: "Time"
pointer: true
- column: "core_media.sizes"
go_type:
import: "github.com/gopherium/gophenberg/internal/sqlite/columns"
type: "Sizes"