From 7f35cf5f6e69cc8aa3d2008bf5b0434c4d7ee5ac Mon Sep 17 00:00:00 2001 From: wellwelwel <46850407+wellwelwel@users.noreply.github.com> Date: Sat, 24 Jun 2023 00:49:17 -0300 Subject: [PATCH] fix: missing `parserCache` in `promise.js` --- promise.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/promise.js b/promise.js index 95b234e179..c4bb609038 100644 --- a/promise.js +++ b/promise.js @@ -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(); +};