@@ -274,23 +274,19 @@ in the directory where the `sqlc` command is run.
274
274
version : " 1"
275
275
packages :
276
276
- name : " db"
277
- emit_json_tags : true
278
- emit_prepared_queries : false
279
- emit_interface : true
280
277
path : " internal/db"
281
278
queries : " ./sql/query/"
282
279
schema : " ./sql/schema/"
280
+ engine : " postgresql"
281
+ emit_json_tags : true
282
+ emit_prepared_queries : true
283
+ emit_interface : false
284
+ emit_exact_table_names : false
283
285
` ` `
284
286
285
287
Each package document has the following keys:
286
288
- ` name`:
287
289
- The package name to use for the generated code. Defaults to `path` basename
288
- - `emit_json_tags` :
289
- - If true, add JSON tags to generated structs. Defaults to `false`.
290
- - `emit_prepared_queries` :
291
- - If true, include support for prepared queries. Defaults to `false`.
292
- - `emit_interface` :
293
- - If true, output a `Querier` interface in the generated package. Defaults to `false`.
294
290
- `path` :
295
291
- Output directory for generated code
296
292
- `queries` :
@@ -299,6 +295,14 @@ Each package document has the following keys:
299
295
- Directory of SQL migrations or path to single SQL file
300
296
- `engine` :
301
297
- Either `postgresql` or `mysql`. Defaults to `postgresql`. MySQL support is experimental
298
+ - `emit_json_tags` :
299
+ - If true, add JSON tags to generated structs. Defaults to `false`.
300
+ - `emit_prepared_queries` :
301
+ - If true, include support for prepared queries. Defaults to `false`.
302
+ - `emit_interface` :
303
+ - If true, output a `Querier` interface in the generated package. Defaults to `false`.
304
+ - `emit_exact_table_names` :
305
+ - If true, struct names will mirror table names. Otherwise, sqlc attempts to singularize plural table names. Defaults to `false`.
302
306
303
307
# ## Type Overrides
304
308
0 commit comments