Skip to content

Commit

Permalink
chore: resolve all remaining circular dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
wellwelwel committed Nov 12, 2024
1 parent 127df3c commit b765a02
Show file tree
Hide file tree
Showing 14 changed files with 1,317 additions and 1,292 deletions.
16 changes: 8 additions & 8 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ exports.Pool = Pool;

exports.PoolCluster = PoolCluster;

exports.createServer = function(handler) {
exports.createServer = function (handler) {
const Server = require('./lib/server.js');
const s = new Server();
if (handler) {
Expand All @@ -45,33 +45,33 @@ exports.raw = SqlString.raw;

exports.__defineGetter__(
'createConnectionPromise',
() => require('./promise.js').createConnection
() => require('./promise.js').createConnection,
);

exports.__defineGetter__(
'createPoolPromise',
() => require('./promise.js').createPool
() => require('./promise.js').createPool,
);

exports.__defineGetter__(
'createPoolClusterPromise',
() => require('./promise.js').createPoolCluster
() => require('./promise.js').createPoolCluster,
);

exports.__defineGetter__('Types', () => require('./lib/constants/types.js'));

exports.__defineGetter__('Charsets', () =>
require('./lib/constants/charsets.js')
require('./lib/constants/charsets.js'),
);

exports.__defineGetter__('CharsetToEncoding', () =>
require('./lib/constants/charset_encodings.js')
require('./lib/constants/charset_encodings.js'),
);

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

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

0 comments on commit b765a02

Please sign in to comment.