[CONJS-225] Make result set's meta property non-enumerable Created: 2022-10-10  Updated: 2022-10-12  Resolved: 2022-10-10

Status: Closed
Project: MariaDB Connector/node.js
Component/s: configuration
Affects Version/s: None
Fix Version/s: 3.1.0

Type: Task Priority: Major
Reporter: Diego Dupin Assignee: Diego Dupin
Resolution: Fixed Votes: 0
Labels: None


 Description   

see https://github.com/mariadb-corporation/mariadb-connector-nodejs/issues/217
Actual implementation return meta as enumerable property of resultset.

example:

const res = await connection.query('select * from animals');
console.log(res):
// [
//    { id: 1, name: 'sea lions' }, 
//    { id: 2, name: 'bird' }, 
//    meta: [ ... ]
// ]

A better solution would be to still have meta property, but nonenumerable:

const res = await connection.query('select * from animals');
console.log(res):
// res : [
//    { id: 1, name: 'sea lions' }, 
//    { id: 2, name: 'bird' }
// ]
const meta = res.meta;
//    meta: [ ... ]


Generated at Thu Feb 08 03:23:40 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.