Switch query events to just send ranges instead of full query text (#19823)

* Switch query events to just send ranges instead of full query text

* undo azdata changes

* fix type

* comment + remove unneeded ?
This commit is contained in:
Charles Gagnon
2022-06-24 15:43:40 -07:00
committed by GitHub
parent 34f32e6564
commit ed5a64f80f
8 changed files with 69 additions and 78 deletions

View File

@@ -9,7 +9,8 @@ import * as azdata from 'azdata';
import { mssqlProviderName } from 'sql/platform/connection/common/constants';
import { Disposable } from 'vs/workbench/api/common/extHostTypes';
import { URI } from 'vs/base/common/uri';
import { IExtHostQueryEvent } from 'sql/workbench/api/common/sqlExtHostTypes';
import { IQueryEvent } from 'sql/workbench/services/query/common/queryModel';
import * as sqlTypeConverters from 'sql/workbench/api/common/sqlExtHostTypeConverters';
class ExtHostQueryDocument implements azdata.queryeditor.QueryDocument {
constructor(
@@ -64,11 +65,11 @@ export class ExtHostQueryEditor implements ExtHostQueryEditorShape {
});
}
public $onQueryEvent(providerId: string, handle: number, fileUri: string, event: IExtHostQueryEvent): 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(providerId, fileUri, this._proxy), params, event.queryInfo);
listener.onQueryEvent(event.type, new ExtHostQueryDocument(providerId, fileUri, this._proxy), params, sqlTypeConverters.QueryInfo.to(event.queryInfo));
}
}