jum4 / sublime-sqlexec

A Plugin for running SQL commands in Sublime Text
http://lubriciousdevelopers.github.io/projects/sublime-sql-exec
98 stars 48 forks source link

config support for MsSQL #47

Open vincent opened 9 years ago

vincent commented 9 years ago

Hi, Here are basic config for supporting mssql.

The main culprit now is the mssql command, I personally choose to use the node one : https://github.com/patriksimek/node-mssql

It is working quite well but does not support the stdin method, used here: https://github.com/jum4/sublime-sqlexec/blob/bd35295f6a162c5717675b863f5014a0a57ca185/SQLExec.py#L24

So I made a tiny wrapper for it:

#!/bin/bash

for line in "`cat`"; do
   /usr/local/bin/mssql $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} -q "$line"
done

It is working well on my mac.