diff --git a/docs/reference/config.md b/docs/reference/config.md index 79c702e8be..02a0445dc5 100644 --- a/docs/reference/config.md +++ b/docs/reference/config.md @@ -17,6 +17,8 @@ packages: emit_empty_slices: false emit_exported_queries: false emit_json_tags: true + emit_result_struct_pointers: false + emit_params_struct_pointers: false json_tags_case_style: "camel" output_db_file_name: "db.go" output_models_file_name: "models.go" @@ -24,6 +26,7 @@ packages: ``` Each package document has the following keys: + - `name`: - The package name to use for the generated code. Defaults to `path` basename - `path`: @@ -50,6 +53,10 @@ Each package document has the following keys: - If true, autogenerated SQL statement can be exported to be accessed by another package. - `emit_json_tags`: - If true, add JSON tags to generated structs. Defaults to `false`. +- `emit_result_struct_pointers`: + - If true, query results are returned as pointers to structs. Queries returning multiple results are returned as slices of pointers. Defaults to `false`. +- `emit_params_struct_pointers`: + - If true, parameters are passed as pointers to structs. Defaults to `false`. - `json_tags_case_style`: - `camel` for camelCase, `pascal` for PascalCase, `snake` for snake_case or `none` to use the column name in the DB. Defaults to `none`. - `output_db_file_name`: @@ -80,6 +87,7 @@ overrides: ``` Each override document has the following keys: + - `db_type`: - 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). - `go_type`: