Document sql column name builder option

This commit is contained in:
Simon Binder 2024-03-06 20:56:03 +01:00
parent 06852f0ec8
commit 914763b47a
No known key found for this signature in database
GPG Key ID: 7891917E4147B8C0
2 changed files with 3 additions and 0 deletions

View File

@ -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`.

View File

@ -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