mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-15 01:25:36 -05:00
Add Query Editor API to sqlops.proposed (#1196)
* add support query editor API * remove sqlops.proposed.d.ts in sp_whoIsActive * address comments * add catch error when connect
This commit is contained in:
29
src/sql/workbench/api/node/extHostQueryEditor.ts
Normal file
29
src/sql/workbench/api/node/extHostQueryEditor.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
'use strict';
|
||||
|
||||
import { IMainContext } from 'vs/workbench/api/node/extHost.protocol';
|
||||
import { ExtHostQueryEditorShape, SqlMainContext, MainThreadQueryEditorShape } from 'sql/workbench/api/node/sqlExtHost.protocol';
|
||||
import * as sqlops from 'sqlops';
|
||||
import * as vscode from 'vscode';
|
||||
|
||||
export class ExtHostQueryEditor implements ExtHostQueryEditorShape {
|
||||
|
||||
private _proxy: MainThreadQueryEditorShape;
|
||||
|
||||
constructor(
|
||||
mainContext: IMainContext
|
||||
) {
|
||||
this._proxy = mainContext.getProxy(SqlMainContext.MainThreadQueryEditor);
|
||||
}
|
||||
|
||||
public $connect(fileUri: string, connectionId: string): Thenable<void> {
|
||||
return this._proxy.$connect(fileUri, connectionId);
|
||||
}
|
||||
|
||||
public $runQuery(fileUri: string): void {
|
||||
return this._proxy.$runQuery(fileUri);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user