Skip to content

Commit 0a44cd1

Browse files
authored
README: Document emit_exact_table_names (#486)
1 parent 8224ace commit 0a44cd1

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

README.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -274,23 +274,19 @@ in the directory where the `sqlc` command is run.
274274
version: "1"
275275
packages:
276276
- name: "db"
277-
emit_json_tags: true
278-
emit_prepared_queries: false
279-
emit_interface: true
280277
path: "internal/db"
281278
queries: "./sql/query/"
282279
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
283285
```
284286
285287
Each package document has the following keys:
286288
- `name`:
287289
- 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`.
294290
- `path`:
295291
- Output directory for generated code
296292
- `queries`:
@@ -299,6 +295,14 @@ Each package document has the following keys:
299295
- Directory of SQL migrations or path to single SQL file
300296
- `engine`:
301297
- 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`.
302306

303307
### Type Overrides
304308

0 commit comments

Comments
 (0)