JackHQ

0 notes

mssqlx

pipe sql to mssqlx and get json out

should work great on all platforms, especially mac and unix, without any other drivers, just nodejs.

usage

echo 'select * from sysobjects' | mssqlx | prettyjson

source

https://github.com/twilson63/node-mssqlx

future

Currently, this only works on the command-line, the next version will work via stream api:

var mssqlx = require('mssqlx'),
  nconf = require('nconf'),
  fs = require('fs'),
  conf = nconf.get('production');

  fs.createFileReadStream('foo.sql').pipe(mssqlx(conf)).pipe(process.stdout);

Filed under nodejs mssql cli sqlserver