Add queryInfo to query events (#19777)

* Add queryInfo to query events

* docs
This commit is contained in:
Charles Gagnon
2022-06-20 11:01:39 -07:00
committed by GitHub
parent 9c9b6343f8
commit f7286b8e81
6 changed files with 113 additions and 19 deletions

18
src/sql/azdata.d.ts vendored
View File

@@ -4992,14 +4992,18 @@ declare module 'azdata' {
| 'executionPlan'
| 'visualize';
/**
* args for each event type
* queryStart: undefined
* queryStop: undefined
* executionPlan: string
* visualize: ResultSetSummary
*/
export interface QueryEventListener {
/**
* A callback that is called whenever a query event occurs
* @param type The type of query event
* @param document The document this event was sent by
* @param args The extra information for the event, if any
* The args sent depend on the type of event :
* queryStart: undefined
* queryStop: undefined
* executionPlan: string (the plan itself)
* visualize: ResultSetSummary (the result set to be visualized)
*/
onQueryEvent(type: QueryEventType, document: QueryDocument, args: ResultSetSummary | string | undefined): void;
}