1.0.1 • Published 4 years ago

egg-lly-mssql v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

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.

License

MIT

1.0.1

4 years ago

1.0.0

4 years ago