Skip to content

Commit 0ae76f5

Browse files
committed
refactor: update value-parser collation read
fixes lint issue and also failing test
1 parent 9687fd7 commit 0ae76f5

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/value-parser.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -458,17 +458,15 @@ function readVariant(parser: Parser, options: ParserOptions, dataLength: number,
458458
case 'VarChar':
459459
case 'Char':
460460
return parser.readUInt16LE((_maxLength) => {
461-
readCollation(parser, (collation) => {
462-
readChars(parser, dataLength, collation.codepage!, callback);
463-
});
461+
const collation = readCollation(parser);
462+
readChars(parser, dataLength, collation.codepage!, callback);
464463
});
465464

466465
case 'NVarChar':
467466
case 'NChar':
468467
return parser.readUInt16LE((_maxLength) => {
469-
readCollation(parser, (_collation) => {
470-
readNChars(parser, dataLength, callback);
471-
});
468+
readCollation(parser);
469+
readNChars(parser, dataLength, callback);
472470
});
473471

474472
default:

0 commit comments

Comments
 (0)