1.0.1 • Published 4 years ago
egg-lly-mssql v1.0.1
Install
$ npm i egg-lly-mssql --save
Usage
// {app_root}/config/plugin.js
exports.mssql = {
enable: true,
package: 'egg-mssql'
};
Configuration
// {app_root}/config/config.default.js
exports.mssql = {
clients: {
local: {
server: '127.0.0.1',
database: 'xxxx',
user: 'sa',
password: '123',
options: { enableArithAbort: false, encrypt: false },
pool: {
max: 10,
min: 0,
idleTimeoutMillis: 30000
}
}
}
};
see config/config.default.js for more detail.
Example
this.ctx.app.mssql.get('local').request().query(`sql`);
Questions & Suggestions
Please open an issue here.