OCA_Backend/api/node_modules/sequelize/lib/dialects/parserStore.js

24 lines
430 B
JavaScript
Raw Normal View History

2022-01-22 13:36:44 +00:00
'use strict';
const stores = new Map();
module.exports = dialect => {
if (!stores.has(dialect)) {
stores.set(dialect, new Map());
}
return {
clear() {
stores.get(dialect).clear();
},
refresh(dataType) {
for (const type of dataType.types[dialect]) {
stores.get(dialect).set(type, dataType.parse);
}
},
get(type) {
return stores.get(dialect).get(type);
}
};
};