Skip to content

GuidoS/mssql2json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mssql2json

mssql2json is a wrapper around the tedious library that takes in db credentials and a query and outputs JSON array as a stream. Please review the documentation at the tedious site for more information about the TDS protocols supported.

Please feel free to submit issues and pull requests. If you'd like to contribute and don't know where to start, have a look at the issue list :)

installation

npm install mssql2json

example

var fromMssql = require('mssql2json');

var config = {
  'query': `select * table`,
  'batchSize': 2,
  'conn': {
    'server': 'test',
    'userName': 'test',
    'password': 'test',
    'options': {
      'database': 'test',
      'port': 1433
    }
  }
};

fromMssql(config.connection, config.query, config.batchSize).pipe(process.stdout);

inspired by

This modules is inspired by postgres2geojson.