From 5d25537613ccaf9eb2b6a8cc027ba3e3154f7ff3 Mon Sep 17 00:00:00 2001 From: Mario564 Date: Sat, 25 Nov 2023 14:20:55 -0600 Subject: [PATCH] Update README --- README.md | 8 +++++--- package.json | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 22c524c..656d155 100644 --- a/README.md +++ b/README.md @@ -191,7 +191,7 @@ 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** @@ -199,7 +199,7 @@ ref likes_liked_by_id_users_id_fk: likes.liked_by_id > users.id [delete: no acti | 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** @@ -207,5 +207,7 @@ ref likes_liked_by_id_users_id_fk: likes.liked_by_id > users.id [delete: no acti | 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. diff --git a/package.json b/package.json index 3e2046e..0f9eae2 100644 --- a/package.json +++ b/package.json @@ -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",