Skip to content

Commit

Permalink
chore: add info on generate types
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonShin committed Nov 4, 2023
1 parent ad17639 commit a0cca14
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions book/src/reference-guide/2.1.configs-file-based.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,18 @@ Then running `sqlx-ts` compile time query checker along with the

### generate_types

```json
{
"generateTypes: {
enabled: true|false,
convertToCamelCaseColumnName: true|false
},
"connections": {
...
}
}
```

Support for configuration of generate types operations.
- `enabled`: enables type generation via config
- `convertToCamelCaseColumnName`: when generating field name based on table's column name, it will automatically cast to camelCase in TypeScript
- `enabled` (default: false): enables type generation via config
- `convertToCamelCaseColumnName` (default: true): when generating field name based on table's column name, it will automatically cast to camelCase in TypeScript

0 comments on commit a0cca14

Please sign in to comment.