Integrated frog-runner

sql-parser
Thorsten Muerell 7 years ago
parent 711c1faebd
commit 5416a2ccbe

Binary file not shown.

@ -3,7 +3,7 @@
"displayName": "frog",
"description": "The Oracle SQL workbench for VSCode",
"version": "0.0.1",
"publisher": "Thorsten",
"publisher": "todie",
"engines": {
"vscode": "^1.17.0"
},

@ -37,11 +37,25 @@ export function activate(context: vscode.ExtensionContext) {
var myOutputChannel = vscode.window.createOutputChannel('SQL Query Results');
if (!dbSession) {
dbSession = spawn("dbc", ['-q', 'scint']);
let extPath = vscode.extensions.getExtension("todie.frog").extensionPath;
dbSession = spawn("java", ['-jar', extPath + '/frog-runner.jar', '172.19.23.18', '1521', 'aax2sm', 'aax2sm', 'aax2sm']);
let outputBuffer = "";
dbSession.stdout.on('data', (data) => {
myOutputChannel.show();
myOutputChannel.append(data.toString());
outputBuffer += data.toString();
try {
let json = JSON.parse(outputBuffer);
for (let row of json["rows"]) {
myOutputChannel.append("--- ROW ---\n");
for (let column of row["columns"]) {
myOutputChannel.append(column['name'] + " " + column['value'] + "\n");
}
}
outputBuffer = "";
} catch (e) {}
});
dbSession.stderr.on('data', (data) => {
@ -56,8 +70,7 @@ export function activate(context: vscode.ExtensionContext) {
}
myOutputChannel.append("Executing: '" + text + "'\n");
dbSession.stdin.write(text + "\n");
dbSession.stdin.write(text + "\n--- END ---\n");
});
context.subscriptions.push(disposable);

Loading…
Cancel
Save