sina-mssqlhelper
v1.0.5
Published
index.js ```javascript const sqlHelper = require('sina-mssqlhelper');
Downloads
4
Readme
Example
index.js
const sqlHelper = require('sina-mssqlhelper');
const config = {
server: 'ServerName',
port: 1433,
user: 'username',
password: 'password',
database: 'databaseName',
options: {
enableArithAbort: true,
},
connectionTimeOut: 150000,
pool: {
max: 10,
min: 0,
idleTimeoutMillis: 30000,
},
trustServerCertificate: true
};
sqlHelper.getRequest(config)
.then(req => {
req.query('select * from dbo.movies')
.then(result => {
console.log(result.recordset);
sqlHelper.close();
});
});