mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51: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 _batchSets: azdata.BatchSummary[] = [];
|
||||||
private _messages: azdata.IResultMessage[] = [];
|
private _messages: azdata.IResultMessage[] = [];
|
||||||
private _eventEmitter = new EventEmitter();
|
private _eventEmitter = new EventEmitter();
|
||||||
|
private registered = false;
|
||||||
|
|
||||||
private _isQueryPlan: boolean;
|
private _isQueryPlan: boolean;
|
||||||
public get isQueryPlan(): boolean { return this._isQueryPlan; }
|
public get isQueryPlan(): boolean { return this._isQueryPlan; }
|
||||||
@@ -207,6 +208,8 @@ export default class QueryRunner extends Disposable {
|
|||||||
this._isQueryPlan = false;
|
this._isQueryPlan = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this._onQueryStart.fire();
|
||||||
|
|
||||||
// Send the request to execute the query
|
// Send the request to execute the query
|
||||||
return runCurrentStatement
|
return runCurrentStatement
|
||||||
? this._queryManagementService.runQueryStatement(this.uri, input.startLine, input.startColumn).then(() => this.handleSuccessRunQueryResult(), e => this.handleFailureRunQueryResult(e))
|
? this._queryManagementService.runQueryStatement(this.uri, input.startLine, input.startColumn).then(() => this.handleSuccessRunQueryResult(), e => this.handleFailureRunQueryResult(e))
|
||||||
@@ -226,10 +229,12 @@ export default class QueryRunner extends Disposable {
|
|||||||
// this isn't exact, but its the best we can do
|
// this isn't exact, but its the best we can do
|
||||||
this._queryStartTime = new Date();
|
this._queryStartTime = new Date();
|
||||||
// The query has started, so lets fire up the result pane
|
// The query has started, so lets fire up the result pane
|
||||||
this._onQueryStart.fire();
|
|
||||||
this._eventEmitter.emit(EventType.START);
|
this._eventEmitter.emit(EventType.START);
|
||||||
|
if (!this.registered) {
|
||||||
|
this.registered = true;
|
||||||
this._queryManagementService.registerRunner(this, this.uri);
|
this._queryManagementService.registerRunner(this, this.uri);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private handleFailureRunQueryResult(error: any) {
|
private handleFailureRunQueryResult(error: any) {
|
||||||
// Attempting to launch the query failed, show the error message
|
// Attempting to launch the query failed, show the error message
|
||||||
|
|||||||
Reference in New Issue
Block a user