title: Using mariadb nodeJS connector with multiple queries
body: <p>I've got a server running Node.js connecting to a MariaDb database.  I'm using the <a href="https://mariadb.com/kb/en/library/getting-started-with-the-nodejs-connector/" rel="nofollow noreferrer">Node.js connector</a> and it's working fine for single queries.  However, when I try to do multiple queries it's throwing this error:</p>
  
  <pre><code>{ Error: (conn=8439, no: 1064, SQLState: 42000) You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 2' at line 1  
  sql: SELECT 1; SELECT 2; - parameters:[]
   at Object.module.exports.createError (\node_modules\mariadb\lib\misc\errors.js:55:10)
   at Packet.readError (\node_modules\mariadb\lib\io\packet.js:506:19)
   at Query.readResponsePacket (\node_modules\mariadb\lib\cmd\resultset.js:47:28)
   at PacketInputStream.receivePacket (\node_modules\mariadb\lib\io\packet-input-stream.js:73:9)
   at PacketInputStream.onData (\node_modules\mariadb\lib\io\packet-input-stream.js:129:20)
   at Socket.emit (events.js:182:13)
   at addChunk (_stream_readable.js:283:12)
   at readableAddChunk (_stream_readable.js:264:11)
   at Socket.Readable.push (_stream_readable.js:219:10)
   at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
  fatal: false,
  errno: 1064,
  sqlState: '42000',
  code: 'ER_PARSE_ERROR' }
  </code></pre>
  
  <p>The current test code I'm using is:</p>
  
  <pre><code>conn = await pool.getConnection({multipleStatements: true});
  conn.query({
    multipleStatements: true,
    sql: "SELECT 1; SELECT 2;"
  }).then((data: any) =&gt; {
    console.log(data);
    conn.end();
  });
  </code></pre>
  
  <p>The <a href="https://mariadb.com/kb/en/library/nodejs-connection-options/#other-options" rel="nofollow noreferrer">documentation</a> suggests <code>multipleStatements</code> is an option, but looking through the <a href="https://github.com/MariaDB/mariadb-connector-nodejs" rel="nofollow noreferrer">GitHub Repo</a>, the only places I've found it is under <a href="https://github.com/MariaDB/mariadb-connector-nodejs/blob/master/lib/config/connection-options.js" rel="nofollow noreferrer">lib/config/connection-options.js</a> and the <a href="https://github.com/MariaDB/mariadb-connector-nodejs/blob/master/documentation/connection-options.md#other-options" rel="nofollow noreferrer">GitHub documentation</a>.  I also noticed the <a href="https://github.com/MariaDB/mariadb-connector-nodejs/blob/master/documentation/batch.md" rel="nofollow noreferrer">batch option</a> but that seems to be specifically for a load of inserts.</p>
  
  <p>Is there a way to use the mariadb-connector-nodejs to run multiple queries in a single <code>query</code> call?  If so, what else could I be doing wrong that only multi-statement queries are not working?</p>
  
  <p>Versions:<br>
  - MariaDb: 10.1.34-MariaDB<br>
  - Node.js: v10.14.2<br>
  - mariadb-connector-nodejs: mariadb@2.0.2-rc</p>