@prisma/driver-adapter-utils 5.21.0-dev.1 → 5.21.0-dev.2
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 +6 -25
- package/dist/index.d.ts +6 -25
- package/dist/index.js +1 -8
- package/dist/index.mjs +1 -8
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -9,13 +9,6 @@ export declare type ArgType = 'Int32' | 'Int64' | 'Float' | 'Double' | 'Text' |
|
|
|
9
9
|
|
|
10
10
|
export declare const bindAdapter: (adapter: DriverAdapter) => ErrorCapturingDriverAdapter;
|
|
11
11
|
|
|
12
|
-
export declare interface BoundDriverAdapter extends Queryable, WithTransaction {
|
|
13
|
-
/**
|
|
14
|
-
* Optional method that returns extra connection info
|
|
15
|
-
*/
|
|
16
|
-
getConnectionInfo?(): Result<ConnectionInfo>;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
12
|
export declare type ColumnType = (typeof ColumnTypeEnum)[keyof typeof ColumnTypeEnum];
|
|
20
13
|
|
|
21
14
|
export declare const ColumnTypeEnum: {
|
|
@@ -60,7 +53,11 @@ export declare type ConnectionInfo = {
|
|
|
60
53
|
|
|
61
54
|
export { Debug }
|
|
62
55
|
|
|
63
|
-
export declare interface DriverAdapter extends Queryable
|
|
56
|
+
export declare interface DriverAdapter extends Queryable {
|
|
57
|
+
/**
|
|
58
|
+
* Starts new transaction.
|
|
59
|
+
*/
|
|
60
|
+
transactionContext(): Promise<Result<TransactionContext>>;
|
|
64
61
|
/**
|
|
65
62
|
* Optional method that returns extra connection info
|
|
66
63
|
*/
|
|
@@ -98,7 +95,7 @@ declare type Error_2 = {
|
|
|
98
95
|
};
|
|
99
96
|
export { Error_2 as Error }
|
|
100
97
|
|
|
101
|
-
export declare interface ErrorCapturingDriverAdapter extends
|
|
98
|
+
export declare interface ErrorCapturingDriverAdapter extends DriverAdapter {
|
|
102
99
|
readonly errorRegistry: ErrorRegistry;
|
|
103
100
|
}
|
|
104
101
|
|
|
@@ -199,20 +196,4 @@ export declare type TransactionOptions = {
|
|
|
199
196
|
usePhantomQuery: boolean;
|
|
200
197
|
};
|
|
201
198
|
|
|
202
|
-
declare interface WithTransaction extends Queryable {
|
|
203
|
-
/**
|
|
204
|
-
* Starts new transaction.
|
|
205
|
-
* If `startTransaction` is not defined, `transactionContext` must be defined.
|
|
206
|
-
*/
|
|
207
|
-
transactionContext?(): Promise<Result<TransactionContext>>;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
declare interface WithTransactionDeprecated extends Queryable {
|
|
211
|
-
/**
|
|
212
|
-
* Starts new transaction.
|
|
213
|
-
* @deprecated Use `transactionContext` instead.
|
|
214
|
-
*/
|
|
215
|
-
startTransaction?(): Promise<Result<Transaction>>;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
199
|
export { }
|
package/dist/index.d.ts
CHANGED
|
@@ -9,13 +9,6 @@ export declare type ArgType = 'Int32' | 'Int64' | 'Float' | 'Double' | 'Text' |
|
|
|
9
9
|
|
|
10
10
|
export declare const bindAdapter: (adapter: DriverAdapter) => ErrorCapturingDriverAdapter;
|
|
11
11
|
|
|
12
|
-
export declare interface BoundDriverAdapter extends Queryable, WithTransaction {
|
|
13
|
-
/**
|
|
14
|
-
* Optional method that returns extra connection info
|
|
15
|
-
*/
|
|
16
|
-
getConnectionInfo?(): Result<ConnectionInfo>;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
12
|
export declare type ColumnType = (typeof ColumnTypeEnum)[keyof typeof ColumnTypeEnum];
|
|
20
13
|
|
|
21
14
|
export declare const ColumnTypeEnum: {
|
|
@@ -60,7 +53,11 @@ export declare type ConnectionInfo = {
|
|
|
60
53
|
|
|
61
54
|
export { Debug }
|
|
62
55
|
|
|
63
|
-
export declare interface DriverAdapter extends Queryable
|
|
56
|
+
export declare interface DriverAdapter extends Queryable {
|
|
57
|
+
/**
|
|
58
|
+
* Starts new transaction.
|
|
59
|
+
*/
|
|
60
|
+
transactionContext(): Promise<Result<TransactionContext>>;
|
|
64
61
|
/**
|
|
65
62
|
* Optional method that returns extra connection info
|
|
66
63
|
*/
|
|
@@ -98,7 +95,7 @@ declare type Error_2 = {
|
|
|
98
95
|
};
|
|
99
96
|
export { Error_2 as Error }
|
|
100
97
|
|
|
101
|
-
export declare interface ErrorCapturingDriverAdapter extends
|
|
98
|
+
export declare interface ErrorCapturingDriverAdapter extends DriverAdapter {
|
|
102
99
|
readonly errorRegistry: ErrorRegistry;
|
|
103
100
|
}
|
|
104
101
|
|
|
@@ -199,20 +196,4 @@ export declare type TransactionOptions = {
|
|
|
199
196
|
usePhantomQuery: boolean;
|
|
200
197
|
};
|
|
201
198
|
|
|
202
|
-
declare interface WithTransaction extends Queryable {
|
|
203
|
-
/**
|
|
204
|
-
* Starts new transaction.
|
|
205
|
-
* If `startTransaction` is not defined, `transactionContext` must be defined.
|
|
206
|
-
*/
|
|
207
|
-
transactionContext?(): Promise<Result<TransactionContext>>;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
declare interface WithTransactionDeprecated extends Queryable {
|
|
211
|
-
/**
|
|
212
|
-
* Starts new transaction.
|
|
213
|
-
* @deprecated Use `transactionContext` instead.
|
|
214
|
-
*/
|
|
215
|
-
startTransaction?(): Promise<Result<Transaction>>;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
199
|
export { }
|
package/dist/index.js
CHANGED
|
@@ -73,14 +73,7 @@ var ErrorRegistryInternal = class {
|
|
|
73
73
|
};
|
|
74
74
|
var bindAdapter = (adapter) => {
|
|
75
75
|
const errorRegistry = new ErrorRegistryInternal();
|
|
76
|
-
|
|
77
|
-
throw new Error(
|
|
78
|
-
"[prisma:driverAdapters] Either `adapter.transactionContext` or `adapter.startTransaction` must be defined."
|
|
79
|
-
);
|
|
80
|
-
}
|
|
81
|
-
const createTransactionContext = adapter.transactionContext === void 0 ? wrapAsync(errorRegistry, () => {
|
|
82
|
-
return Promise.resolve(ok(adapter));
|
|
83
|
-
}) : wrapAsync(errorRegistry, adapter.transactionContext.bind(adapter));
|
|
76
|
+
const createTransactionContext = wrapAsync(errorRegistry, adapter.transactionContext.bind(adapter));
|
|
84
77
|
const boundAdapter = {
|
|
85
78
|
adapterName: adapter.adapterName,
|
|
86
79
|
errorRegistry,
|
package/dist/index.mjs
CHANGED
|
@@ -43,14 +43,7 @@ var ErrorRegistryInternal = class {
|
|
|
43
43
|
};
|
|
44
44
|
var bindAdapter = (adapter) => {
|
|
45
45
|
const errorRegistry = new ErrorRegistryInternal();
|
|
46
|
-
|
|
47
|
-
throw new Error(
|
|
48
|
-
"[prisma:driverAdapters] Either `adapter.transactionContext` or `adapter.startTransaction` must be defined."
|
|
49
|
-
);
|
|
50
|
-
}
|
|
51
|
-
const createTransactionContext = adapter.transactionContext === void 0 ? wrapAsync(errorRegistry, () => {
|
|
52
|
-
return Promise.resolve(ok(adapter));
|
|
53
|
-
}) : wrapAsync(errorRegistry, adapter.transactionContext.bind(adapter));
|
|
46
|
+
const createTransactionContext = wrapAsync(errorRegistry, adapter.transactionContext.bind(adapter));
|
|
54
47
|
const boundAdapter = {
|
|
55
48
|
adapterName: adapter.adapterName,
|
|
56
49
|
errorRegistry,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/driver-adapter-utils",
|
|
3
|
-
"version": "5.21.0-dev.
|
|
3
|
+
"version": "5.21.0-dev.2",
|
|
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": "5.21.0-dev.
|
|
34
|
+
"@prisma/debug": "5.21.0-dev.2"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
37
|
"dev": "DEV=true tsx helpers/build.ts",
|