-
-
Notifications
You must be signed in to change notification settings - Fork 557
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Config file of sea-orm-cli generate entity
command
#1185
Comments
Comments? @tyt2y3 |
Agree. I think there should be a default path where we load this file from, i.e. somewhere in the Second, only options related to entity generation can be specified, the following: "max_connections": 1,
"output_dir": "out",
"database_schema": "public",
"database_url": "postgres://root:root@localhost/database", should NOT be included. |
I would like to work on this issue. I will like to use the |
Apparently config-rs is written by one of the SQLx authors |
Nice fact |
Acc. To you which approach is better
I am not used to open source much. So if the thinks are say seem too basic or are wrong please do let me know. |
Sorry for the late reply, if you want to work on it, feel free and just do whatever you think makes the most sense! I think we always want cli params to override the config file, so it's a two pass process, we first load a config file, and then override the options with the cli params. I think the serde struct can be shared with https://crates.io/crates/structopt thus removing code duplication. |
@tyt2y3 If you have suggestion for improvement let me know. |
Motivation
The options and flags for
sea-orm-cli generate entity
command is getting more and more. It's time to consider a scalable plan: loading the options from a config file.Proposed Solutions
Load all options by providing the path to the config file:
sea-orm-cli generate entity --config generate-entity.config.json
. The config file must be a JSON value.Related Discussion
The text was updated successfully, but these errors were encountered: