File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,8 @@ First, you need to create a Prisma schema file called schema.prisma and define t
4040// schema.prisma
4141generator client {
4242 provider = "prisma-client-js"
43- previewFeatures = ["driverAdapters"]
43+ output = "../src/generated/prisma"
44+ engineType = "client"
4445}
4546
4647datasource db {
@@ -63,7 +64,7 @@ Here is an example of query:
6364``` js
6465// query.js
6566import { PrismaTiDBCloud } from ' @tidbcloud/prisma-adapter' ;
66- import { PrismaClient } from ' @prisma/client ' ;
67+ import { PrismaClient } from ' ./generated/prisma ' ;
6768import dotenv from ' dotenv' ;
6869
6970// setup
@@ -94,7 +95,7 @@ Here is an example of transaction:
9495``` js
9596// query.js
9697import { PrismaTiDBCloud } from ' @tidbcloud/prisma-adapter' ;
97- import { PrismaClient } from ' @prisma/client ' ;
98+ import { PrismaClient } from ' ./generated/prisma ' ;
9899import dotenv from ' dotenv' ;
99100
100101// setup
You can’t perform that action at this time.
0 commit comments