@prisma/driver-adapter-utils 6.7.0-dev.1 → 6.7.0-dev.10

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.d.mts CHANGED
@@ -94,6 +94,49 @@ declare type Error_2 = {
94
94
  } | {
95
95
  kind: 'InvalidIsolationLevel';
96
96
  level: string;
97
+ } | {
98
+ kind: 'LengthMismatch';
99
+ column?: string;
100
+ } | {
101
+ kind: 'UniqueConstraintViolation';
102
+ fields: string[];
103
+ } | {
104
+ kind: 'NullConstraintViolation';
105
+ fields: string[];
106
+ } | {
107
+ kind: 'ForeignKeyConstraintViolation';
108
+ constraint?: {
109
+ fields: string[];
110
+ } | {
111
+ index: string;
112
+ } | {
113
+ foreignKey: {};
114
+ };
115
+ } | {
116
+ kind: 'DatabaseDoesNotExist';
117
+ db?: string;
118
+ } | {
119
+ kind: 'DatabaseAlreadyExists';
120
+ db?: string;
121
+ } | {
122
+ kind: 'DatabaseAccessDenied';
123
+ db?: string;
124
+ } | {
125
+ kind: 'AuthenticationFailed';
126
+ user?: string;
127
+ } | {
128
+ kind: 'TransactionWriteConflict';
129
+ } | {
130
+ kind: 'TableDoesNotExist';
131
+ table?: string;
132
+ } | {
133
+ kind: 'ColumnNotFound';
134
+ column?: string;
135
+ } | {
136
+ kind: 'TooManyConnections';
137
+ cause: string;
138
+ } | {
139
+ kind: 'SocketTimeout';
97
140
  } | {
98
141
  kind: 'postgres';
99
142
  code: string;
@@ -153,6 +196,8 @@ declare class ErrorRegistryInternal implements ErrorRegistry {
153
196
  registerNewError(error: unknown): number;
154
197
  }
155
198
 
199
+ export declare function isDriverAdapterError(error: any): error is DriverAdapterError;
200
+
156
201
  export declare type IsolationLevel = 'READ UNCOMMITTED' | 'READ COMMITTED' | 'REPEATABLE READ' | 'SNAPSHOT' | 'SERIALIZABLE';
157
202
 
158
203
  /**
package/dist/index.d.ts CHANGED
@@ -94,6 +94,49 @@ declare type Error_2 = {
94
94
  } | {
95
95
  kind: 'InvalidIsolationLevel';
96
96
  level: string;
97
+ } | {
98
+ kind: 'LengthMismatch';
99
+ column?: string;
100
+ } | {
101
+ kind: 'UniqueConstraintViolation';
102
+ fields: string[];
103
+ } | {
104
+ kind: 'NullConstraintViolation';
105
+ fields: string[];
106
+ } | {
107
+ kind: 'ForeignKeyConstraintViolation';
108
+ constraint?: {
109
+ fields: string[];
110
+ } | {
111
+ index: string;
112
+ } | {
113
+ foreignKey: {};
114
+ };
115
+ } | {
116
+ kind: 'DatabaseDoesNotExist';
117
+ db?: string;
118
+ } | {
119
+ kind: 'DatabaseAlreadyExists';
120
+ db?: string;
121
+ } | {
122
+ kind: 'DatabaseAccessDenied';
123
+ db?: string;
124
+ } | {
125
+ kind: 'AuthenticationFailed';
126
+ user?: string;
127
+ } | {
128
+ kind: 'TransactionWriteConflict';
129
+ } | {
130
+ kind: 'TableDoesNotExist';
131
+ table?: string;
132
+ } | {
133
+ kind: 'ColumnNotFound';
134
+ column?: string;
135
+ } | {
136
+ kind: 'TooManyConnections';
137
+ cause: string;
138
+ } | {
139
+ kind: 'SocketTimeout';
97
140
  } | {
98
141
  kind: 'postgres';
99
142
  code: string;
@@ -153,6 +196,8 @@ declare class ErrorRegistryInternal implements ErrorRegistry {
153
196
  registerNewError(error: unknown): number;
154
197
  }
155
198
 
199
+ export declare function isDriverAdapterError(error: any): error is DriverAdapterError;
200
+
156
201
  export declare type IsolationLevel = 'READ UNCOMMITTED' | 'READ COMMITTED' | 'REPEATABLE READ' | 'SNAPSHOT' | 'SERIALIZABLE';
157
202
 
158
203
  /**
package/dist/index.js CHANGED
@@ -27,6 +27,7 @@ __export(index_exports, {
27
27
  bindMigrationAwareSqlAdapterFactory: () => bindMigrationAwareSqlAdapterFactory,
28
28
  bindSqlAdapterFactory: () => bindSqlAdapterFactory,
29
29
  err: () => err,
30
+ isDriverAdapterError: () => isDriverAdapterError,
30
31
  mockAdapter: () => mockAdapter,
31
32
  mockAdapterErrors: () => mockAdapterErrors,
32
33
  mockAdapterFactory: () => mockAdapterFactory,
@@ -264,6 +265,7 @@ function mockMigrationAwareAdapterFactory(provider) {
264
265
  bindMigrationAwareSqlAdapterFactory,
265
266
  bindSqlAdapterFactory,
266
267
  err,
268
+ isDriverAdapterError,
267
269
  mockAdapter,
268
270
  mockAdapterErrors,
269
271
  mockAdapterFactory,
package/dist/index.mjs CHANGED
@@ -226,6 +226,7 @@ export {
226
226
  bindMigrationAwareSqlAdapterFactory,
227
227
  bindSqlAdapterFactory,
228
228
  err,
229
+ isDriverAdapterError,
229
230
  mockAdapter,
230
231
  mockAdapterErrors,
231
232
  mockAdapterFactory,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/driver-adapter-utils",
3
- "version": "6.7.0-dev.1",
3
+ "version": "6.7.0-dev.10",
4
4
  "description": "Internal set of utilities and types for Prisma's driver adapters.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -31,7 +31,7 @@
31
31
  "license": "Apache-2.0",
32
32
  "sideEffects": false,
33
33
  "dependencies": {
34
- "@prisma/debug": "6.7.0-dev.1"
34
+ "@prisma/debug": "6.7.0-dev.10"
35
35
  },
36
36
  "scripts": {
37
37
  "dev": "DEV=true tsx helpers/build.ts",