pool_connection.js 495 B

1234567891011121314151617181920212223
  1. 'use strict';
  2. const PromiseConnection = require('./connection.js');
  3. const BasePoolConnection = require('../base/pool_connection.js');
  4. class PromisePoolConnection extends PromiseConnection {
  5. constructor(connection, promiseImpl) {
  6. super(connection, promiseImpl);
  7. }
  8. destroy() {
  9. return BasePoolConnection.prototype.destroy.apply(
  10. this.connection,
  11. arguments
  12. );
  13. }
  14. async [Symbol.asyncDispose]() {
  15. this.release();
  16. }
  17. }
  18. module.exports = PromisePoolConnection;