function tables(connection) {
  return query('SHOW TABLES', connection).then(({ rows }) => rows.map(row => row[0]));
}
The following function will return a list of tables.
@param {Object} connection connection parameters
@returns {Promise} that resolves to an array of table names