Readd query plan (#2409)

* fix grid links

* formatting

* remove commented code

* adding query plan

* asd

* add query plan

* fix title
This commit is contained in:
Anthony Dresser
2018-09-05 12:11:33 -07:00
committed by GitHub
parent ce0c955c29
commit 1356f0bcf6
7 changed files with 122 additions and 3 deletions

View File

@@ -63,6 +63,9 @@ export default class QueryRunner {
private _hasCompleted: boolean = false;
private _batchSets: sqlops.BatchSummary[] = [];
private _eventEmitter = new EventEmitter();
private _isQueryPlan: boolean;
public get isQueryPlan(): boolean { return this._isQueryPlan; }
private _onMessage = new Emitter<sqlops.IResultMessage>();
public readonly onMessage = debounceEvent<sqlops.IResultMessage, sqlops.IResultMessage[]>(echo(this._onMessage.event), (l, e) => {
@@ -171,6 +174,12 @@ export default class QueryRunner {
this._totalElapsedMilliseconds = 0;
// TODO issue #228 add statusview callbacks here
if (runOptions && (runOptions.displayActualQueryPlan || runOptions.displayEstimatedQueryPlan)) {
this._isQueryPlan = true;
} else {
this._isQueryPlan = false;
}
// Send the request to execute the query
return runCurrentStatement
? this._queryManagementService.runQueryStatement(ownerUri, input.startLine, input.startColumn).then(() => this.handleSuccessRunQueryResult(), e => this.handleFailureRunQueryResult(e))