@prisma/driver-adapter-utils
Advanced tools
Comparing version
@@ -47,6 +47,2 @@ export declare const bindAdapter: (adapter: DriverAdapter) => ErrorCapturingDriverAdapter; | ||
startTransaction(): Promise<Result<Transaction>>; | ||
/** | ||
* Closes the connection to the database, if any. | ||
*/ | ||
close: () => Promise<Result<void>>; | ||
} | ||
@@ -107,3 +103,3 @@ | ||
export declare interface Queryable { | ||
readonly flavour: 'mysql' | 'postgres' | 'sqlite'; | ||
readonly provider: 'mysql' | 'postgres' | 'sqlite'; | ||
/** | ||
@@ -110,0 +106,0 @@ * Execute a query given as SQL, interpolating the given parameters, |
@@ -92,8 +92,7 @@ "use strict"; | ||
executeRaw: wrapAsync(errorRegistry, adapter.executeRaw.bind(adapter)), | ||
flavour: adapter.flavour, | ||
provider: adapter.provider, | ||
startTransaction: async (...args) => { | ||
const result = await startTransaction(...args); | ||
return result.map((tx) => bindTransaction(errorRegistry, tx)); | ||
}, | ||
close: wrapAsync(errorRegistry, adapter.close.bind(adapter)) | ||
} | ||
}; | ||
@@ -103,3 +102,3 @@ }; | ||
return { | ||
flavour: transaction.flavour, | ||
provider: transaction.provider, | ||
options: transaction.options, | ||
@@ -106,0 +105,0 @@ queryRaw: wrapAsync(errorRegistry, transaction.queryRaw.bind(transaction)), |
{ | ||
"name": "@prisma/driver-adapter-utils", | ||
"version": "5.7.0-integration-engines-5-7-0-35-integration-join-support-410139eef35af9df36db3d2a06afe5803bbbe14f.2", | ||
"version": "5.7.0-integration-engines-5-7-0-36-fix-wasm-integration-dd302ab4c61c86ae1267d1eea3dbde4cb2cede82.1", | ||
"description": "Internal set of utilities and types for Prisma's driver adapters.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
29239
-1.2%446
-1.33%