Initial commit - Event Planner application
This commit is contained in:
16
node_modules/kysely/dist/esm/driver/default-connection-provider.js
generated
vendored
Normal file
16
node_modules/kysely/dist/esm/driver/default-connection-provider.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/// <reference types="./default-connection-provider.d.ts" />
|
||||
export class DefaultConnectionProvider {
|
||||
#driver;
|
||||
constructor(driver) {
|
||||
this.#driver = driver;
|
||||
}
|
||||
async provideConnection(consumer) {
|
||||
const connection = await this.#driver.acquireConnection();
|
||||
try {
|
||||
return await consumer(connection);
|
||||
}
|
||||
finally {
|
||||
await this.#driver.releaseConnection(connection);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user