title: How to use mysql in node with Typescript
body: <h1>Background</h1>
  
  <p>I'm making a simple website with node and typescript.
  I installed <a href="https://github.com/mysqljs/mysql" rel="nofollow noreferrer">MySQL module</a> to communicate with a database.</p>
  
  <h1>Problem</h1>
  
  <p>I'm trying to get data from DB, but I don't know how to determine what type the result should have. For example,</p>
  
  <pre><code>const sql = `SELECT metaValue FROM ${this.table} WHERE metaKey = '${key}'`;
  const result = await this.pool.query(sql);
  console.log(result);
  </code></pre>
  
  <p>in this case, the result is <code>[ RowDataPacket { metaValue: 'map-79.jpg' } ]</code>. How can I get <code>map-79.jpg</code> from the result? What type the result should be?</p>