@sqb/connect
Advanced tools
Comparing version 4.5.2 to 4.5.3
@@ -55,6 +55,3 @@ "use strict"; | ||
destroy: instance => instance.close(), | ||
reset: async (instance) => { | ||
await this.emitAsyncSerial('connection-return').catch(); | ||
return instance.reset(); | ||
}, | ||
reset: async (instance) => instance.reset(), | ||
validate: instance => instance.test() | ||
@@ -111,2 +108,3 @@ }; | ||
connection.on('error', (error) => this.emit('error', error)); | ||
connection.on('close', () => this.emitAsyncSerial('connection-return', connection)); | ||
return connection; | ||
@@ -113,0 +111,0 @@ } |
@@ -15,3 +15,3 @@ import { Pool as LightningPool } from 'lightning-pool'; | ||
terminate: () => void; | ||
'connection-return': () => Promise<void>; | ||
'connection-return': (connection: SqbConnection) => Promise<void>; | ||
} | ||
@@ -18,0 +18,0 @@ declare const SqbClient_base: Type<import("strict-typed-events").TypedEventEmitter<any, SqbClientEvents, SqbClientEvents>>; |
@@ -51,6 +51,3 @@ import _debug from 'debug'; | ||
destroy: instance => instance.close(), | ||
reset: async (instance) => { | ||
await this.emitAsyncSerial('connection-return').catch(); | ||
return instance.reset(); | ||
}, | ||
reset: async (instance) => instance.reset(), | ||
validate: instance => instance.test() | ||
@@ -107,2 +104,3 @@ }; | ||
connection.on('error', (error) => this.emit('error', error)); | ||
connection.on('close', () => this.emitAsyncSerial('connection-return', connection)); | ||
return connection; | ||
@@ -109,0 +107,0 @@ } |
{ | ||
"name": "@sqb/connect", | ||
"description": "Multi-dialect database connection framework written with TypeScript", | ||
"version": "4.5.2", | ||
"version": "4.5.3", | ||
"author": "Panates", | ||
@@ -6,0 +6,0 @@ "contributors": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
40
333569
7986