mariadb-corporation / mariadb-connector-nodejs

MariaDB Connector/Node.js is used to connect applications developed on Node.js to MariaDB and MySQL databases. MariaDB Connector/Node.js is LGPL licensed.
GNU Lesser General Public License v2.1
366 stars 91 forks source link

Typescript: metaAsArray missing in QueryConfig? #231

Closed MR4online closed 1 year ago

MR4online commented 1 year ago

I think the metaAsArray property is missing in the QueryConfig interface.

The following works, but is not covered by the TypeScript definition:

const connection = mySqlPool.getConnection();
connection.execute({
     sql: "SELECT * FROM test WHERE id = ?",
     metaAsArray: true,
}, [1]).then(async ([results, meta]: any) => {
...
});
rusher commented 1 year ago

this will be corrected in 3.1.0 with https://github.com/mariadb-corporation/mariadb-connector-nodejs/commit/ba70356ae9485120120b57843f9157ac83145f04 commit