You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+122-20
Original file line number
Diff line number
Diff line change
@@ -105,32 +105,134 @@ Setting up a custom binary allows you to completely customize the generation; ho
105
105
cargo install dsync
106
106
```
107
107
108
-
**CLI Usage**
109
-
110
-
*`-i`: path to the diesel schema file
111
-
*`-o`: model output directory
112
-
*`-c`: connection type (for example: `diesel::sqlite::SqliteConnection`)
113
-
*`-g`: (optional, repeatable) list of columns that are automatically generated by create/update triggers (for example, `created_at`, `updated_at`)
114
-
*`--tsync`: (optional) adds `#[tsync]` attribute to generated structs for the [`tsync` crate](https://github.com/Wulf/tsync)
115
-
*`--model-path`: (optional) set a custom model import path, default `crate::models::`
116
-
*`--schema-path`: (optional) set a custom schema import path, default `crate::schema::`
117
-
*`--no-serde`: (optional) if set, does not output any serde related code
118
-
*`--no-crud`: (optional) Do not generate the CRUD functions for generated models
119
-
*`--create-str`: (optional) Set which string type to use for`Create*` structs (possible are `string`, `str`, `cow`)
120
-
*`--update-str`: (optional) Set which string type to use for`Update*` structs (possible are `string`, `str`, `cow`)
121
-
*`--single-model-file`: (optional) Generate only a single model file, instead of a directory with `mod.rs` and `generated.rs`
122
-
*`--readonly-prefix`: (optional, repeatable) A prefix to treat a table matching this as readonly*2
123
-
*`--readonly-suffix`: (optional, repeatable) A suffix to treat a table matching this as readonly*2
124
-
*`--diesel-backend`: (when the "advanced-queries" feature is enabled) The diesel backend in use (possible values include `diesel::pg::Pg`, `diesel::sqlite::Sqlite`, `diesel::mysql::Mysql`, or your custom backend type)
108
+
### CLI Usage
125
109
110
+
```sh
111
+
Generate rust structs & query functions from diesel schema files.
0 commit comments