mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Adds functionality to open execution plans from DB tables and DMVs. (#20377)
* Adds functionality to open execution plans from DB tables and DMVs. * Code review changes * Renames method to getProviderFromUri
This commit is contained in:
@@ -1279,10 +1279,30 @@ export class ExecutionPlanServiceFeature extends SqlOpsFeature<undefined> {
|
||||
);
|
||||
};
|
||||
|
||||
const isExecutionPlan = (value: string): Thenable<azdata.executionPlan.IsExecutionPlanResult> => {
|
||||
return new Promise((resolve) => {
|
||||
let isExecutionPlan = false;
|
||||
let queryExecutionPlanFileExtension = '';
|
||||
|
||||
if (value.includes('ShowPlanXML')) {
|
||||
isExecutionPlan = true;
|
||||
queryExecutionPlanFileExtension = 'sqlplan';
|
||||
}
|
||||
|
||||
const result: azdata.executionPlan.IsExecutionPlanResult = {
|
||||
isExecutionPlan: isExecutionPlan,
|
||||
queryExecutionPlanFileExtension: queryExecutionPlanFileExtension,
|
||||
};
|
||||
|
||||
return resolve(result);
|
||||
});
|
||||
};
|
||||
|
||||
return azdata.dataprotocol.registerExecutionPlanProvider({
|
||||
providerId: client.providerId,
|
||||
getExecutionPlan,
|
||||
compareExecutionPlanGraph
|
||||
compareExecutionPlanGraph,
|
||||
isExecutionPlan
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user