Closed izzymg closed 5 years ago
The connection interface definition in mysql doesn't actually include ping, but it does exist on both Connection and PoolConnection
mysql
Connection
PoolConnection
const connection = mysql2.createConnection({...}); connection.ping((error) => console.error);
const pool = mysql2.createPool({...}); const conn = await pool.getConnection(); try { await conn.ping(); } catch(error) { console.error(error); }
Thanks!
The connection interface definition in
mysql
doesn't actually include ping, but it does exist on bothConnection
andPoolConnection