@prisma/adapter-pg 6.12.0-dev.4 → 6.12.0-dev.40
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/dist/index.js +3 -2
- package/dist/index.mjs +3 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -422,7 +422,7 @@ function convertDriverError(error) {
|
|
|
422
422
|
case "28000":
|
|
423
423
|
return {
|
|
424
424
|
kind: "DatabaseAccessDenied",
|
|
425
|
-
db: error.message.split("
|
|
425
|
+
db: error.message.split(",").find((s) => s.startsWith(" database"))?.split('"').at(1)
|
|
426
426
|
};
|
|
427
427
|
case "28P01":
|
|
428
428
|
return {
|
|
@@ -604,7 +604,8 @@ var PrismaPgAdapter = class extends PgQueryable {
|
|
|
604
604
|
}
|
|
605
605
|
}
|
|
606
606
|
async executeScript(script) {
|
|
607
|
-
|
|
607
|
+
const statements = script.split(";").map((stmt) => stmt.trim()).filter((stmt) => stmt.length > 0);
|
|
608
|
+
for (const stmt of statements) {
|
|
608
609
|
try {
|
|
609
610
|
await this.client.query(stmt);
|
|
610
611
|
} catch (error) {
|
package/dist/index.mjs
CHANGED
|
@@ -386,7 +386,7 @@ function convertDriverError(error) {
|
|
|
386
386
|
case "28000":
|
|
387
387
|
return {
|
|
388
388
|
kind: "DatabaseAccessDenied",
|
|
389
|
-
db: error.message.split("
|
|
389
|
+
db: error.message.split(",").find((s) => s.startsWith(" database"))?.split('"').at(1)
|
|
390
390
|
};
|
|
391
391
|
case "28P01":
|
|
392
392
|
return {
|
|
@@ -568,7 +568,8 @@ var PrismaPgAdapter = class extends PgQueryable {
|
|
|
568
568
|
}
|
|
569
569
|
}
|
|
570
570
|
async executeScript(script) {
|
|
571
|
-
|
|
571
|
+
const statements = script.split(";").map((stmt) => stmt.trim()).filter((stmt) => stmt.length > 0);
|
|
572
|
+
for (const stmt of statements) {
|
|
572
573
|
try {
|
|
573
574
|
await this.client.query(stmt);
|
|
574
575
|
} catch (error) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/adapter-pg",
|
|
3
|
-
"version": "6.12.0-dev.
|
|
3
|
+
"version": "6.12.0-dev.40",
|
|
4
4
|
"description": "Prisma's driver adapter for \"pg\"",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"postgres-array": "3.0.4",
|
|
35
35
|
"pg": "^8.11.3",
|
|
36
|
-
"@prisma/driver-adapter-utils": "6.12.0-dev.
|
|
36
|
+
"@prisma/driver-adapter-utils": "6.12.0-dev.40"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@swc/core": "1.11.5",
|