Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
shiyuhang0 committed Dec 25, 2023
1 parent 0b9245b commit d44c6d7
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions lib/parsers/static_text_parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ function readField({ packet, type, charset, encoding, config, options }) {
case Types.DOUBLE:
return packet.parseLengthCodedFloat();
case Types.NULL:
// case Types.BIT:
// return 'packet.readBuffer(2)[1]';
case Types.DECIMAL:
case Types.NEWDECIMAL:
if (config.decimalNumbers) {
Expand Down Expand Up @@ -100,16 +98,14 @@ function getStaticTextParser(fields, options, config) {
for (let i = 0; i < fields.length; i++) {
const field = fields[i];
const typeCast = options.typeCast ? options.typeCast : config.typeCast;
const next = () => {
return readField({
packet,
type: field.columnType,
encoding: field.encoding,
charset: field.characterSet,
config,
options
})
}
const next = () => readField({
packet,
type: field.columnType,
encoding: field.encoding,
charset: field.characterSet,
config,
options
})
let value;
if (typeof typeCast === 'function') {
value = typeCast(createTypecastField(field, packet), next);
Expand Down

0 comments on commit d44c6d7

Please sign in to comment.