Skip to content

Commit d734d08

Browse files
committed
Remove unnecessary reference to CharsetEncoding
1 parent 0ba4f87 commit d734d08

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

lib/commands/query.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ const Command = require('./command.js');
99
const Packets = require('../packets/index.js');
1010
const getTextParser = require('../parsers/text_parser.js');
1111
const ServerStatus = require('../constants/server_status.js');
12-
const CharsetToEncoding = require('../constants/charset_encodings.js');
1312

1413
const EmptyPacket = new Packets.Packet(0, Buffer.allocUnsafe(4), 0, 4);
1514

@@ -241,8 +240,7 @@ class Query extends Command {
241240
row = this._rowParser.next(
242241
packet,
243242
this._fields[this._resultIndex],
244-
this.options,
245-
CharsetToEncoding
243+
this.options
246244
);
247245
} catch (err) {
248246
this._localStreamError = err;

lib/parsers/binary_parser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ function readCodeFor(field, config, options, fieldNum) {
7474
if (field.characterSet === Charsets.BINARY) {
7575
return 'packet.readLengthCodedBuffer();';
7676
}
77-
return `packet.readLengthCodedString(CharsetToEncoding[fields[${fieldNum}].characterSet])`;
77+
return `packet.readLengthCodedString(fields[${fieldNum}].encoding)`;
7878
}
7979
}
8080

0 commit comments

Comments
 (0)