sidorares / sidorares/node-mysql2

Unwanted meta information on quering with Bluebird Promises.

Open
#648 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
TypeScript
Stars
4.4k
Forks
680
Avg merge
9h 7m
Merged PRs (30d)
59

Description

Hi guys,

I use Bluebird promises implementation for my project. Every SELECT(not sure about others) query that I run gives me the following unwanted result also. Is this by design or some issue with configuration? I checked the basic configuration and can't figure out if it's something that I am doing. This meta is kinda unnecessary. It would be better if this could be made optional.

{ catalog: 'def',
          schema: 'my_db',
          name: 'state',
          orgName: 'state',
          table: 'my_table',
          orgTable: 'my_table',
          characterSet: 224,
          columnLength: 1020,
          columnType: 253,
          flags: 0,
          decimals: 0 
}

Here's my config and I use pools exclusively.

var bluebird = require('bluebird');
// var Promise = require('bluebird');
var mysql = require('mysql2/promise');
var options = {
    connectionLimit: 20,
    host: mysqlHost,
    user: mysqlUser,
    password: mysqlPassword,
    database: mysqlDb,
    multipleStatements: true,
    Promise: bluebird
};

bluebird.longStackTraces();
var pool = mysql.createPool(options);

Thanks!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the mysql2/promise pool created through mysql.createPool and reproduce a SELECT using the supplied Bluebird Promise configuration. Trace where the metadata object is exposed and determine the expected optional behavior; the issue is done when that behavior is covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
mysql, node.js
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.