Problema con getConnection

Estoy intentado conectarme a la base de datos con el modulo promise-mysql desde express con node, mis archivo son los siguientes. Desde consola me puedo conectar a mysql sin problemas, lo mismo que utilizando phpmyAdmin o Workbench

Al ejecutar recibo el error de

TypeError: pool.getConnection is not a function

Keys.ts

export default {      database : {         host : 'localhost',         user: 'root',         password: '124563',         database: 'ng_db'     } } 

database.ts

import mysql from 'promise-mysql'; import keys from './keys';  const pool = mysql.createPool(keys.database);  pool.getConnection()     .then(connection => {       pool.releaseConnection(connection);         console.log('DB is Connected');      });  export default pool; 

gameController.ts

import pool from '../database'; import { Request,Response } from 'express';  class GameController {      public index (req: Request, res: Response) {       pool.query('DESCRIBE game');       res.json('game')       }   } 

Multiple use of `getConnection()` in a single block and impact performance issues

I found a module someone created and looked into the code. I found that this person was making a lot connection as such in a single block:

public function checkStoreExists($  storeID){     $  connection = $  this->_resource->getConnection(\Magento\Framework\App\ResourceConnection::DEFAULT_CONNECTION);     // some code } public function checkCategoryExists($  categoryID){     $  connection = $  this->_resource->getConnection(\Magento\Framework\App\ResourceConnection::DEFAULT_CONNECTION);     // some code } public function checkBrandExists($  brandID){     $  connection = $  this->_resource->getConnection(\Magento\Framework\App\ResourceConnection::DEFAULT_CONNECTION);     // some code } public function checkRangeExists($  rangeID){     $  connection = $  this->_resource->getConnection(\Magento\Framework\App\ResourceConnection::DEFAULT_CONNECTION);     // some code }  public function checkProductExists($  productID, $  rangeID){     $  connection = $  this->_resource->getConnection(\Magento\Framework\App\ResourceConnection::DEFAULT_CONNECTION);     // some code }  public function checkProductOptionExists($  productID, $  rangeID, $  productSku){     $  connection = $  this->_resource->getConnection(\Magento\Framework\App\ResourceConnection::DEFAULT_CONNECTION);     // some code }  public function GetNextProductIndex(){     $  connection = $  this->_resource->getConnection(\Magento\Framework\App\ResourceConnection::DEFAULT_CONNECTION);     // some code }  public function GetNextProductOptionIndex(){     $  connection = $  this->_resource->getConnection(\Magento\Framework\App\ResourceConnection::DEFAULT_CONNECTION);     // some code } 

Will that have any impact on performance? Is this okey to leave or should I adjust this somehow?