Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
L-Mario564 committed Nov 25, 2023
1 parent 30d5a9b commit 5d25537
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,21 +191,23 @@ ref likes_liked_by_id_users_id_fk: likes.liked_by_id > users.id [delete: no acti
| Option | Type | Description |
| ---------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| schema | PgSchema | An object containing Postgres dialect tables, enums and relations |
| out | string | The output directory and file name. Uses the current working directory as the root |
| out? | string | The output directory and file name. Uses the current working directory as the root. If not set, it will not write the DBML file. |
| relational | boolean? | If set to true, it will create references based on the relations generated with the `relations` function instead of foreign keys. Useful for databases that don't support foreign keys. Default: `false`. |

**mysqlGenerate**

| Option | Type | Description |
| ---------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| schema | MySqlSchema | An object containing MySQL dialect tables and relations |
| out | string | The output directory and file name. Uses the current working directory as the root |
| out? | string | The output directory and file name. Uses the current working directory as the root. If not set, it will not write the DBML file. |
| relational | boolean? | If set to true, it will create references based on the relations generated with the `relations` function instead of foreign keys. Useful for databases that don't support foreign keys. Default: `false`. |

**sqliteGenerate**

| Option | Type | Description |
| ---------- | ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| schema | SQLiteSchema | An object containing SQLite dialect tables and relations |
| out | string | The output directory and file name. Uses the current working directory as the root |
| out? | string | The output directory and file name. Uses the current working directory as the root. If not set, it will not write the DBML file. |
| relational | boolean? | If set to true, it will create references based on the relations generated with the `relations` function instead of foreign keys. Useful for databases that don't support foreign keys. Default: `false`. |

All generate functions return the DBML as a string regardless if a file is written or not, in case you want to do something with the generated DBML.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "drizzle-dbml-generator",
"version": "0.5.0",
"version": "0.6.0",
"description": "Convert your Drizzle ORM schema into DBML markup",
"main": "dist/index.cjs",
"module": "dist/index.js",
Expand Down

0 comments on commit 5d25537

Please sign in to comment.