Skip to content

Commit 024a5af

Browse files
authored
update doc (#44)
1 parent f32a762 commit 024a5af

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ First, you need to create a Prisma schema file called schema.prisma and define t
4040
// schema.prisma
4141
generator client {
4242
provider = "prisma-client-js"
43-
previewFeatures = ["driverAdapters"]
43+
output = "../src/generated/prisma"
44+
engineType = "client"
4445
}
4546
4647
datasource db {
@@ -63,7 +64,7 @@ Here is an example of query:
6364
```js
6465
// query.js
6566
import { PrismaTiDBCloud } from '@tidbcloud/prisma-adapter';
66-
import { PrismaClient } from '@prisma/client';
67+
import { PrismaClient } from './generated/prisma';
6768
import dotenv from 'dotenv';
6869

6970
// setup
@@ -94,7 +95,7 @@ Here is an example of transaction:
9495
```js
9596
// query.js
9697
import { PrismaTiDBCloud } from '@tidbcloud/prisma-adapter';
97-
import { PrismaClient } from '@prisma/client';
98+
import { PrismaClient } from './generated/prisma';
9899
import dotenv from 'dotenv';
99100

100101
// setup

0 commit comments

Comments
 (0)