-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsqlc.yaml
More file actions
126 lines (85 loc) · 3.03 KB
/
Copy pathsqlc.yaml
File metadata and controls
126 lines (85 loc) · 3.03 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# ==============================================================================
# BeaconLink
# sqlc.yaml
#
# Documentation:
# https://docs.sqlc.dev/
# ==============================================================================
version: "2"
sql:
# ============================================================================
# PostgreSQL
# ============================================================================
- engine: postgresql
schema:
- internal/db/schema
queries:
- internal/db/query
gen:
go:
package: db
out: internal/db/sqlc
sql_package: pgx/v5
emit_json_tags: true
emit_db_tags: true
emit_prepared_queries: false
emit_interface: true
emit_exact_table_names: false
emit_empty_slices: true
emit_result_struct_pointers: false
emit_params_struct_pointers: false
emit_methods_with_db_argument: false
emit_pointers_for_null_types: true
emit_enum_valid_method: true
emit_all_enum_values: true
emit_exported_queries: true
emit_sql_as_comment: true
emit_sync_querier: true
emit_async_querier: false
output_batch_file_name: batch.go
output_db_file_name: db.go
output_models_file_name: models.go
output_querier_file_name: querier.go
output_copyfrom_file_name: copyfrom.go
overrides:
# --------------------------------------------------------------------
# UUID
# --------------------------------------------------------------------
- db_type: "uuid"
go_type:
import: github.com/google/uuid
type: UUID
# --------------------------------------------------------------------
# Timestamp
# --------------------------------------------------------------------
- db_type: "timestamptz"
go_type:
import: time
type: Time
- db_type: "timestamp"
go_type:
import: time
type: Time
# --------------------------------------------------------------------
# Date
# --------------------------------------------------------------------
- db_type: "date"
go_type:
import: time
type: Time
# --------------------------------------------------------------------
# JSON
# --------------------------------------------------------------------
- db_type: "json"
go_type:
import: encoding/json
type: RawMessage
- db_type: "jsonb"
go_type:
import: encoding/json
type: RawMessage
# --------------------------------------------------------------------
# Numeric
# --------------------------------------------------------------------
- db_type: "numeric"
go_type: float64