1.0.1 • Published 1 year ago

mssqldriver v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

mssqldriver

Driver for MS SQL Server, based on https://tediousjs.github.io/tedious

Features

  1. Receiving data in chunks or full
  2. Receiving spid
  3. Many queries in one connection

License

MIT

Install

npm i mssqldriver

Example

import * as mssqldriver from 'mssqldriver'
const mssql = mssqldriver.Create({
    authentication: 'sqlserver',
    instance: 'myserver/myinstance',
    login: 'sa',
    password: '123'
})
mssql.exec([`print 'Hello'`, `select * from sys.columns`], {formatCells: 'string', hasSpid: true, receiveMessage: 'directly', receiveTables: 200}, callbackExec => {
    if (callbackExec.kind === 'spid') {
        console.log(`spid`, callbackExec.spid)
        return
    }
    if (callbackExec.kind === 'message') {
        console.log(`message`, callbackExec.message)
        return
    }
    if (callbackExec.kind === 'columns') {
        console.log(`columns (new table begin)`, callbackExec.columns)
        return
    }
    if (callbackExec.kind === 'rows') {
        console.log(`rows`, callbackExec.rows)
        return
    }
    if (callbackExec.kind === 'finish') {
        console.log(`finish`, callbackExec.finish)
    }
})
1.0.1

1 year ago

0.0.14

2 years ago

0.0.12

2 years ago

0.0.10

2 years ago

0.0.11

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.1

3 years ago