mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-19 01:25:36 -05:00
move event to better understand when things are happening (#4393)
This commit is contained in:
committed by
Karl Burtram
parent
2557d77ae3
commit
839a9b6cb8
@@ -72,6 +72,7 @@ export default class QueryRunner extends Disposable {
|
||||
private _batchSets: azdata.BatchSummary[] = [];
|
||||
private _messages: azdata.IResultMessage[] = [];
|
||||
private _eventEmitter = new EventEmitter();
|
||||
private registered = false;
|
||||
|
||||
private _isQueryPlan: boolean;
|
||||
public get isQueryPlan(): boolean { return this._isQueryPlan; }
|
||||
@@ -207,6 +208,8 @@ export default class QueryRunner extends Disposable {
|
||||
this._isQueryPlan = false;
|
||||
}
|
||||
|
||||
this._onQueryStart.fire();
|
||||
|
||||
// Send the request to execute the query
|
||||
return runCurrentStatement
|
||||
? this._queryManagementService.runQueryStatement(this.uri, input.startLine, input.startColumn).then(() => this.handleSuccessRunQueryResult(), e => this.handleFailureRunQueryResult(e))
|
||||
@@ -226,9 +229,11 @@ export default class QueryRunner extends Disposable {
|
||||
// this isn't exact, but its the best we can do
|
||||
this._queryStartTime = new Date();
|
||||
// The query has started, so lets fire up the result pane
|
||||
this._onQueryStart.fire();
|
||||
this._eventEmitter.emit(EventType.START);
|
||||
this._queryManagementService.registerRunner(this, this.uri);
|
||||
if (!this.registered) {
|
||||
this.registered = true;
|
||||
this._queryManagementService.registerRunner(this, this.uri);
|
||||
}
|
||||
}
|
||||
|
||||
private handleFailureRunQueryResult(error: any) {
|
||||
|
||||
Reference in New Issue
Block a user