title: Use JS object as values on mySQL query string
body: <p>Im using pool to query mySQL on nodejs. We doing and it is working fine.</p>
  
  <pre><code>let values = [1, 2, 3];
  DB.pool.query('SELECT * ROM table_name WHERE col1 = ? AND col2 = ? AND col3 = ?' , values, ( err, rows ) =&gt; {
      //Do something
  });
  </code></pre>
  
  <p>As you can notice, the where values are on array and we use <code>?</code> on the query string to insert those values. The problem with this is, on complex queries, there are alot of value.</p>
  
  <p><strong>Is there a way to use object instead?</strong></p>
  
  <p>Something like:</p>
  
  <pre><code>let values = {col1: 1, col1: 2, col1: 3};
  </code></pre>
  
  <p>and the query string would be like:</p>
  
  <pre><code>SELECT * ROM table_name WHERE col1 = :col1 AND col2 = :col2 AND col3 = :col3
  </code></pre>
  
  <p>Any help would be appreciated.</p>