code: function runQuery(query, connection) {
    const myConnection = mysql.createConnection({
      multipleStatements: true,
      host: connection.host,
      port: connection.port ? connection.port : 3306,
      user: connection.username,
      password: connection.password,
      database: connection.database,
      insecureAuth: connection.mysqlInsecureAuth,
      timezone: 'Z',
      supportBigNumbers: true
    });
  
    return new Promise((resolve, reject) => {
      let incomplete = false;
      const rows = [];
  
      myConnection.connect(err => {
        if (err) {
          return reject(err);
        }
        let queryError;
        let resultsSent = false;
  
        function continueOn() {
          if (!resultsSent) {
            resultsSent = true;
            if (queryError) {
              return reject(queryError);
            }
            return resolve({ rows, incomplete });
          }
        }
  
        const myQuery = myConnection.query(query);
        myQuery
          .on('error', function(err) {
            // Handle error,
            // an 'end' event will be emitted after this as well
            // so we'll call the callback there.
            queryError = err;
          })
          .on('result', function(row) {
            // If we haven't hit the max yet add row to results
            if (rows.length < connection.maxRows) {
              return rows.push(row);
            }
  
            // Too many rows
            incomplete = true;
  
            // Stop the query stream
            myConnection.pause();
  
            // Destroy the underlying connection
            // Calling end() will wait and eventually time out
            myConnection.destroy();
            continueOn();
          })
          .on('end', function() {
            // all rows have been received
            // This will not fire if we end the connection early
            // myConnection.end()
            // myConnection.destroy()
            myConnection.end(error => {
              if (error) {
                console.error('Error ending MySQL connection', error);
              }
              continueOn();
            });
          });
      });
    });
  }
docs: Run query for connection
  Should return { rows, incomplete }
  @param {string} query
  @param {object} connection