Skip to content

Commit

Permalink
Document sql column name builder option
Browse files Browse the repository at this point in the history
  • Loading branch information
simolus3 committed Mar 6, 2024
1 parent 06852f0 commit 914763b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/pages/docs/Generation options/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ At the moment, drift supports these options:
(so a column named `user_name` would also use `user_name` as a json key instead of `userName`).
You can always override the json key by using a `JSON KEY` column constraint
(e.g. `user_name VARCHAR NOT NULL JSON KEY userName`).
* `use_sql_column_name_as_json_key` (defaults to false): Uses the column name in SQL as the JSON key for serialization,
regardless of whether the table was defined in a drift file or not.
* `generate_connect_constructor` (deprecated): Generates a named `connect()` constructor on database classes
that takes a `DatabaseConnection` instead of a `QueryExecutor`.
This option was deprecated in drift 2.5 because `DatabaseConnection` now implements `QueryExecutor`.
Expand Down
1 change: 1 addition & 0 deletions drift_dev/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## 2.17.0-dev

- Fix drift using the wrong import alias in generated part files.
- Add the `use_sql_column_name_as_json_key` builder option.

## 2.16.0

Expand Down

0 comments on commit 914763b

Please sign in to comment.