From 5a1c85aa040d20928bff2431e6d017e762d38afa Mon Sep 17 00:00:00 2001 From: Thorsten Muerell Date: Tue, 14 Nov 2017 00:17:05 +0100 Subject: [PATCH] Add commit and rollback --- package.json | 8 ++++++++ src/extension.ts | 10 ++++++++++ 2 files changed, 18 insertions(+) diff --git a/package.json b/package.json index af7ebc8..5d6f484 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,14 @@ "command": "frog.compileFile", "title": "Frog: Compiles the current file" }, + { + "command": "frog.commit", + "title": "Frog: Commits the current transaction" + }, + { + "command": "frog.rollback", + "title": "Frog: Rollbacks" + }, { "command": "frog.selectConnection", "title": "Frog: Selects the connection to use" diff --git a/src/extension.ts b/src/extension.ts index ccfce73..493ab3d 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -49,6 +49,16 @@ export function activate(context: vscode.ExtensionContext) { }); context.subscriptions.push(disposable); + disposable = vscode.commands.registerCommand('frog.commit', () => { + sessionManager.execute("commit", 0); + }); + context.subscriptions.push(disposable); + + disposable = vscode.commands.registerCommand('frog.rollback', () => { + sessionManager.execute("rollback", 0); + }); + context.subscriptions.push(disposable); + function changeSession(node: ConnectionNode) { sessionManager.currentConnection = node; }