From e792b6e3ea2beda682331dd57e59d8a06d000c48 Mon Sep 17 00:00:00 2001 From: farreldarian Date: Tue, 9 Apr 2024 22:25:00 +0700 Subject: [PATCH] update readme --- README.md | 4 ++++ packages/generator/README.md | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 882311f..17c655a 100644 --- a/README.md +++ b/README.md @@ -66,13 +66,17 @@ In addition to the Prisma features, you can also generate Drizzle-specific featu | Key | Description | Default | Example | | --------------- | --------------------------------- | ----------- | ----------- | | output | Change the output | "./drizzle" | "../models" | +| | Generate single output file | | "drizzle.ts" | | formatter | Run prettier after generation | - | "prettier" | | relationalQuery | Flag to generate relational query | true | false | | moduleResolution | Specify the [module resolution](https://www.typescriptlang.org/tsconfig#moduleResolution) that will affect the import style | _*auto_ | nodenext | | verbose | Flag to enable verbose logging | - | true | +| **dateMode | Change the generated mode for date | "date" || _* It will find the closest tsconfig from the current working directory. Note that [extends](https://www.typescriptlang.org/tsconfig#extends) is not supported_ +_*Does not work with sqlite_ + ### Setting up [relational query](https://orm.drizzle.team/docs/rqb) ```ts diff --git a/packages/generator/README.md b/packages/generator/README.md index 882311f..8f503a7 100644 --- a/packages/generator/README.md +++ b/packages/generator/README.md @@ -49,7 +49,7 @@ prisma generate > **Note:** This generator will use the [default Prisma field mapping](https://www.prisma.io/docs/orm/reference/prisma-schema-reference#model-field-scalar-types), meaning any `@db.*` modifiers will be ignored for now. -**prisma-generator-drizzle** aims for 1:1 compatibility with Prisma, this means that you can use the generated Drizzle schema as a complete and familiar drop-in replacement for the Prisma client. +**prisma-generator-drizzle** aims for 1:1 compatibility with Prisma, this means that you can use the generated Drizzle schema as a complete and familiar drop-in replacement for the Prisma client. - [Setup drizzle-kit](#setting-up-drizzle-kit) - [Setup relational query](#setting-up-relational-query) @@ -66,13 +66,17 @@ In addition to the Prisma features, you can also generate Drizzle-specific featu | Key | Description | Default | Example | | --------------- | --------------------------------- | ----------- | ----------- | | output | Change the output | "./drizzle" | "../models" | +| | Generate single output file | | "drizzle.ts" | | formatter | Run prettier after generation | - | "prettier" | | relationalQuery | Flag to generate relational query | true | false | | moduleResolution | Specify the [module resolution](https://www.typescriptlang.org/tsconfig#moduleResolution) that will affect the import style | _*auto_ | nodenext | | verbose | Flag to enable verbose logging | - | true | +| **dateMode | Change the generated mode for date | "date" || _* It will find the closest tsconfig from the current working directory. Note that [extends](https://www.typescriptlang.org/tsconfig#extends) is not supported_ +_*Does not work with sqlite_ + ### Setting up [relational query](https://orm.drizzle.team/docs/rqb) ```ts @@ -201,4 +205,4 @@ Check also [the discussion](https://github.com/farreldarian/prisma-generator-dri ### SqliteError: NOT NULL constraint failed: \.id -Currently having `@default(autoincrement())` only work for postgres and mysql. \ No newline at end of file +Currently having `@default(autoincrement())` only work for postgres and mysql.