Skip to content

Commit

Permalink
fix: missing parserCache in promise.js
Browse files Browse the repository at this point in the history
wellwelwel committed Jun 24, 2023

Verified

This commit was signed with the committer’s verified signature.
addaleax Anna Henningsen
1 parent 4ce2c70 commit 7f35cf5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions promise.js
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@

const core = require('./index.js');
const EventEmitter = require('events').EventEmitter;
const parserCache = require('./lib/parsers/parser_cache.js');

function makeDoneCb(resolve, reject, localErr) {
return function (err, rows, fields) {
@@ -573,3 +574,11 @@ exports.__defineGetter__('Charsets', () =>
exports.__defineGetter__('CharsetToEncoding', () =>
require('./lib/constants/charset_encodings.js')
);

exports.setMaxParserCache = function(max) {
parserCache.setMaxCache(max);
};

exports.clearParserCache = function() {
parserCache.clearCache();
};

0 comments on commit 7f35cf5

Please sign in to comment.