mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-18 09:35:39 -05:00
Introducing Visualizer to SQL Query Editor (#6422)
* extension recommendation on application launch * Introducing Visualizer (SandDance) to the SQL Query Editor. (#6347) * Created Visualizer icon in the results grid. Utilized a context key so that the icon only shows if Visualizer extensions (currently, just SandDance) is installed. Visualizer icon open up SandDance in a top-level document. * When the user clicks on Charts, visualizer recommendation popup appears. User can click on "Install Extensions" to download the visualizer extensions. * Enabled SQL Query Editor to pass query data to SandDance extension. * Introducing Visualizer (SandDance) to the SQL Query Editor. (#6347) * Created Visualizer icon in the results grid. Utilized a context key so that the icon only shows if Visualizer extensions (currently, just SandDance) is installed. Visualizer icon open up SandDance in a top-level document. * When the user clicks on Charts, visualizer recommendation popup appears. User can click on "Install Extensions" to download the visualizer extensions. * Enabled SQL Query Editor to pass query data to SandDance extension. * Cleaned code; made changes according to PR comments * removed the test service for extensions gallary * Cleaned up code according to PR changes * unid changes to build/azure-piplines * Removed all the build/azure-pipelines changes * removed changes on media/language.svg * refactored extension recommendation system to allow it to be generic * updated extensionsViews to support generic extension query search; added localized constants for visualizer extensions * Made syntax and error message changes acccording to PR comments. * Updated recommendation message according to scenario type
This commit is contained in:
committed by
Rachel Kim
parent
720a7fbfa2
commit
2c8a22bb0d
@@ -310,6 +310,15 @@ export class QueryModelService implements IQueryModelService {
|
||||
this._onQueryEvent.fire(event);
|
||||
});
|
||||
|
||||
queryRunner.onVisualize(resultSetInfo => {
|
||||
let event: IQueryEvent = {
|
||||
type: 'visualize',
|
||||
uri: uri,
|
||||
params: resultSetInfo
|
||||
};
|
||||
this._onQueryEvent.fire(event);
|
||||
});
|
||||
|
||||
info.queryRunner = queryRunner;
|
||||
info.dataService = this._instantiationService.createInstance(DataService, uri);
|
||||
this._queryInfoMap.set(uri, info);
|
||||
|
||||
@@ -85,6 +85,9 @@ export default class QueryRunner extends Disposable {
|
||||
private _onQueryPlanAvailable = this._register(new Emitter<IQueryPlanInfo>());
|
||||
public readonly onQueryPlanAvailable = this._onQueryPlanAvailable.event;
|
||||
|
||||
private _onVisualize = this._register(new Emitter<azdata.ResultSetSummary>());
|
||||
public readonly onVisualize = this._onVisualize.event;
|
||||
|
||||
private _queryStartTime: Date;
|
||||
public get queryStartTime(): Date {
|
||||
return this._queryStartTime;
|
||||
@@ -579,6 +582,17 @@ export default class QueryRunner extends Disposable {
|
||||
public getGridDataProvider(batchId: number, resultSetId: number): IGridDataProvider {
|
||||
return this.instantiationService.createInstance(QueryGridDataProvider, this, batchId, resultSetId);
|
||||
}
|
||||
|
||||
public notifyVisualizeRequested(batchId: number, resultSetId: number): void {
|
||||
let result: azdata.ResultSetSummary = {
|
||||
batchId: batchId,
|
||||
id: resultSetId,
|
||||
columnInfo: this.batchSets[batchId].resultSetSummaries[resultSetId].columnInfo,
|
||||
complete: true,
|
||||
rowCount: this.batchSets[batchId].resultSetSummaries[resultSetId].rowCount
|
||||
};
|
||||
this._onVisualize.fire(result);
|
||||
}
|
||||
}
|
||||
|
||||
export class QueryGridDataProvider implements IGridDataProvider {
|
||||
|
||||
Reference in New Issue
Block a user