Uploaded image for project: 'MariaDB Connector/node.js'
  1. MariaDB Connector/node.js
  2. CONJS-225

Make result set's meta property non-enumerable

    XMLWordPrintable

Details

    • Task
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • 3.1.0
    • configuration
    • 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: [ ... ]
      
      

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            diego dupin Diego Dupin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.