Make SandDance work generically for Kusto (#12229)

* Make SandDance work generically for Kusto and Postgres

* Addressed comments

* removed param

Co-authored-by: Monica Gupta <mogupt@microsoft.com>
This commit is contained in:
Monica Gupta
2020-09-11 11:28:30 -07:00
committed by GitHub
parent a823e44393
commit f8d725e15b
4 changed files with 10 additions and 9 deletions

View File

@@ -52,17 +52,17 @@ export class ExtHostQueryEditor implements ExtHostQueryEditorShape {
return this._proxy.$runQuery(fileUri, runCurrentQuery);
}
public $registerQueryInfoListener(providerId: string, listener: azdata.queryeditor.QueryEventListener): void {
public $registerQueryInfoListener(listener: azdata.queryeditor.QueryEventListener): void {
this._queryListeners[this._nextListenerHandle] = listener;
this._proxy.$registerQueryInfoListener(this._nextListenerHandle, providerId);
this._proxy.$registerQueryInfoListener(this._nextListenerHandle);
this._nextListenerHandle++;
}
public $onQueryEvent(handle: number, fileUri: string, event: IQueryEvent): void {
public $onQueryEvent(providerId: string, handle: number, fileUri: string, event: IQueryEvent): void {
let listener: azdata.queryeditor.QueryEventListener = this._queryListeners[handle];
if (listener) {
let params = event.params && event.params.planXml ? event.params.planXml : event.params;
listener.onQueryEvent(event.type, new ExtHostQueryDocument(mssqlProviderName, fileUri, this._proxy), params);
listener.onQueryEvent(event.type, new ExtHostQueryDocument(providerId, fileUri, this._proxy), params);
}
}

View File

@@ -486,7 +486,7 @@ export function createAdsApiFactory(accessor: ServicesAccessor): IAdsExtensionAp
},
registerQueryEventListener(listener: azdata.queryeditor.QueryEventListener): void {
extHostQueryEditor.$registerQueryInfoListener(mssqlProviderName, listener);
extHostQueryEditor.$registerQueryInfoListener(listener);
},
getQueryDocument(fileUri: string): Thenable<azdata.queryeditor.QueryDocument> {

View File

@@ -820,7 +820,7 @@ export interface MainThreadModelViewDialogShape extends IDisposable {
$setDirty(handle: number, isDirty: boolean): void;
}
export interface ExtHostQueryEditorShape {
$onQueryEvent(handle: number, fileUri: string, event: IQueryEvent): void;
$onQueryEvent(providerId: string, handle: number, fileUri: string, event: IQueryEvent): void;
}
export interface MainThreadQueryEditorShape extends IDisposable {
@@ -829,7 +829,7 @@ export interface MainThreadQueryEditorShape extends IDisposable {
$runQuery(fileUri: string, runCurrentQuery?: boolean): void;
$createQueryTab(fileUri: string, title: string, content: string): void;
$setQueryExecutionOptions(fileUri: string, options: azdata.QueryExecutionOptions): Thenable<void>;
$registerQueryInfoListener(handle: number, providerId: string): void;
$registerQueryInfoListener(handle: number): void;
}
export interface ExtHostNotebookShape {