title: node mysql2 can't access update results
body: <p>I'm doing a simple UPDATE with <a href="https://www.npmjs.com/package/mysql2" rel="noreferrer">mysql2</a> :</p>
  
  <pre><code>   UPDATE table1
      SET table1.value1 = ?, table1.value2 = ? 
      WHERE user_id = (
        SELECT user_id 
        FROM user
        WHERE company_id = ?
      ) 
  </code></pre>
  
  <p>table1 is related to the user table by <code>user_id</code>, but I only have the <code>company_id</code> so I do a subquery (probably should be a join, but thats another discussion): </p>
  
  <pre><code>const [results, buff] = await connection.execute(query, values);
  return results
  </code></pre>
  
  <p>However, when accessing the results to make sure there are no errors and that only a single row is updated, <code>results</code> returns: </p>
  
  <pre><code>  console.log
      ResultSetHeader {
        fieldCount: 0,
        affectedRows: 1,
        insertId: 0,
        info: 'Rows matched: 1  Changed: 0  Warnings: 0',
        serverStatus: 2,
        warningStatus: 0,
        changedRows: 0
      }
  </code></pre>
  
  <p>But I can't access the values. If I try <code>results.affectedRows</code> I get </p>
  
  <pre><code>Property 'affectedRows' does not exist on type 'RowDataPacket[] | RowDataPacket[][] | OkPacket | OkPacket[]'.
  </code></pre>
  
  <p>The only way to make it work is to do <code>results['affectedRows']</code>. Any suggestions? </p>