-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsqlc.yaml
More file actions
29 lines (28 loc) · 1.01 KB
/
Copy pathsqlc.yaml
File metadata and controls
29 lines (28 loc) · 1.01 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
# sqlc — typed Go from SQL queries.
#
# Day 5 wires `make generate` to invoke sqlc against this config. Today
# (Day 3) the file is laid down so the config is ready and the inputs
# (internal/db/queries/*.sql) follow the conventions sqlc expects. Until
# Day 5, the equivalent Go lives at internal/db/audit_queries.go.
#
# Reference: https://docs.sqlc.dev/en/latest/reference/config.html
version: "2"
sql:
- engine: postgresql
queries: internal/db/queries
schema: internal/db/migrations
gen:
go:
package: db
sql_package: pgx/v5
out: internal/db
emit_json_tags: false
emit_db_tags: false
emit_pointers_for_null_types: true
emit_exact_table_names: false
emit_empty_slices: true
output_files_suffix: ".gen"
# When Day 5 lands, this emits files like:
# internal/db/audit.sql.gen.go (queries)
# internal/db/models.gen.go (table models)
# The hand-written internal/db/audit_queries.go is then deleted.