Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "interpreting" parser #2099

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add "interpreting" parser #2099

wants to merge 1 commit into from

Conversation

sidorares
Copy link
Owner

WIP, work related to

#2090

@github-actions
Copy link
Contributor

Coverage report

The coverage rate is 89.19497573508421%

The branch rate is 84.97191011235955%

100% of new lines are covered.

const Types = require('../constants/types.js');
const Charsets = require('../constants/charsets.js');
const helpers = require('../helpers');
const genFunc = require('generate-function');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const genFunc = require('generate-function');

const Charsets = require('../constants/charsets.js');
const helpers = require('../helpers');
const genFunc = require('generate-function');
const parserCache = require('./parser_cache.js');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const parserCache = require('./parser_cache.js');

return packet.parseLengthCodedFloat();
case Types.NULL:
// case Types.BIT:
// return 'packet.readBuffer(2)[1]';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete the useless code?

@@ -212,7 +213,11 @@ class Query extends Command {
if (this._receivedFieldsCount === this._fieldCount) {
const fields = this._fields[this._resultIndex];
this.emit('fields', fields);
this._rowParser = new (getTextParser(fields, this.options, connection.config))(fields);
if (this.options.useStaticParser) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add this option to connection.config.js

waitForConnections: 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants