mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-21 09:35:38 -05:00
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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> {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user