You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reference/config.md
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -17,13 +17,16 @@ packages:
17
17
emit_empty_slices: false
18
18
emit_exported_queries: false
19
19
emit_json_tags: true
20
+
emit_result_struct_pointers: false
21
+
emit_params_struct_pointers: false
20
22
json_tags_case_style: "camel"
21
23
output_db_file_name: "db.go"
22
24
output_models_file_name: "models.go"
23
25
output_querier_file_name: "querier.go"
24
26
```
25
27
26
28
Each package document has the following keys:
29
+
27
30
- `name`:
28
31
- The package name to use for the generated code. Defaults to `path` basename
29
32
- `path`:
@@ -50,6 +53,10 @@ Each package document has the following keys:
50
53
- If true, autogenerated SQL statement can be exported to be accessed by another package.
51
54
- `emit_json_tags`:
52
55
- If true, add JSON tags to generated structs. Defaults to `false`.
56
+
- `emit_result_struct_pointers`:
57
+
- If true, query results are returned as pointers to structs. Queries returning multiple results are returned as slices of pointers. Defaults to `false`.
58
+
- `emit_params_struct_pointers`:
59
+
- If true, parameters are passed as pointers to structs. Defaults to `false`.
53
60
- `json_tags_case_style`:
54
61
- `camel`for camelCase, `pascal` for PascalCase, `snake` for snake_case or `none` to use the column name in the DB. Defaults to `none`.
55
62
- `output_db_file_name`:
@@ -80,6 +87,7 @@ overrides:
80
87
```
81
88
82
89
Each override document has the following keys:
90
+
83
91
- `db_type`:
84
92
- The PostgreSQL type to override. Find the full list of supported types in [postgresql_type.go](https://github.com/kyleconroy/sqlc/blob/main/internal/codegen/golang/postgresql_type.go#L12).
0 commit comments