Skip to content

Commit 6191ebb

Browse files
committed
update documentation
1 parent ac65f0f commit 6191ebb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ The `schema` parameter allows you to specify a name for the output files and dif
2424
npx @corteks/mysql-data-generator --db mysql://user:password@127.0.0.1:3306/database --analyse --schema schema
2525
```
2626

27+
The `--schema` parameter allows you to generate mutliple configuration with different names.
28+
2729
If you want to customize the schema, modify the default `settings/schema_custom.jsonc` that has also be generated.
2830

2931
## 2. Data generation
@@ -62,11 +64,13 @@ Available options in `schema_custom.json`:
6264
- `Table.addLines: number` // Number of rows to be inserted on a single run. The number of lines resulting in the table will not exceed `Table.maxLines`
6365
- `Table.columns: Column[]` // list of columns handled by the tool
6466
- `Column.name: string` // column name
65-
- `Column.generator: bit | boolean | date | foreignKey | integer | real | time | string | values | function` // data type generator used for this column
67+
- `Column.generator: bit | boolean | date | foreignKey | integer | real | time | string | values | function | faker` // data type generator used for this column
6668
- `Column.[key: string]: any[]` // list of options for this column
6769
- `Column.foreignKey: { table: string, column: string, where: string }` // link to the table.column referenced by this foreign key. A custom clause can ba added to filter value from the foreign column
6870
- `Column.values: string | any[] | { [key: string]: number }`
6971
// Name of the list of values to use for this column.
7072
// You can also directly specify an array of strings for values.
7173
// Or you can use an object to specify a ratio per value. Ratio will be a number between 0 and 1.
7274
- `Column.customFunction: (rowIndex: number, row: { [key: string]: string | number }` // a string representing a javascript custom function. It will receive the row index and the full row as arguments.
75+
- `Column.template: string` // a template string for `faker` generator. See [fakerjs](https://www.npmjs.com/package/@faker-js/faker) for more information.
76+
- `Column.locale: string` // locale used by the faker generator.

0 commit comments

Comments
 (0)