UNPKG

jsonapi-express-backend-query

Version:
8 lines (7 loc) 351 B
module.exports = function(config) { if(! config || ['mysql', 'pgsql'].indexOf(config.dialect) === -1) { // Leave sqlite for later, 'sqlite' |sqlite throw new Error("config object's dialect key should be one of (mysql|pgsql) instead of " + config.dialect); } const { dialect } = config; return require('./lib/' + dialect)(config); }