@prisma/adapter-pg 6.16.0-dev.32 → 6.16.0-dev.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -26
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -10,38 +10,15 @@ This package contains the driver adapter for Prisma ORM that enables usage of th
|
|
|
10
10
|
|
|
11
11
|
This section explains how you can use it with Prisma ORM and the `@prisma/adapter-pg` driver adapter. Be sure that the `DATABASE_URL` environment variable is set to your PostgreSQL connection string (e.g. in a `.env` file).
|
|
12
12
|
|
|
13
|
-
### 1.
|
|
13
|
+
### 1. Install the dependencies
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
```prisma
|
|
18
|
-
// schema.prisma
|
|
19
|
-
generator client {
|
|
20
|
-
provider = "prisma-client-js"
|
|
21
|
-
previewFeatures = ["driverAdapters"]
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
datasource db {
|
|
25
|
-
provider = "postgresql"
|
|
26
|
-
url = env("DATABASE_URL")
|
|
27
|
-
}
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
Once you have added the feature flag to your schema, re-generate Prisma Client:
|
|
31
|
-
|
|
32
|
-
```
|
|
33
|
-
npx prisma generate
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
### 2. Install the dependencies
|
|
37
|
-
|
|
38
|
-
Next, install the Prisma ORM's driver adapter for pg:
|
|
15
|
+
Install the Prisma ORM's driver adapter for pg:
|
|
39
16
|
|
|
40
17
|
```
|
|
41
18
|
npm install @prisma/adapter-pg
|
|
42
19
|
```
|
|
43
20
|
|
|
44
|
-
###
|
|
21
|
+
### 2. Instantiate Prisma Client using the driver adapter
|
|
45
22
|
|
|
46
23
|
Finally, when you instantiate Prisma Client, you need to pass an instance of Prisma ORM's driver adapter to the `PrismaClient` constructor:
|
|
47
24
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/adapter-pg",
|
|
3
|
-
"version": "6.16.0-dev.
|
|
3
|
+
"version": "6.16.0-dev.33",
|
|
4
4
|
"description": "Prisma's driver adapter for \"pg\"",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"postgres-array": "3.0.4",
|
|
35
35
|
"pg": "^8.11.3",
|
|
36
|
-
"@prisma/driver-adapter-utils": "6.16.0-dev.
|
|
36
|
+
"@prisma/driver-adapter-utils": "6.16.0-dev.33"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/pg": "8.11.11",
|
|
40
|
-
"@prisma/debug": "6.16.0-dev.
|
|
40
|
+
"@prisma/debug": "6.16.0-dev.33"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"dev": "DEV=true tsx helpers/build.ts",
|