Sending show plan graph to ADS on Result Set updated event (#1300)

* Sending showplan graph over json rpc in Result updated event
Translating showplan graph into simple objects to be sent over JSON RPC

* Revert "Sending showplan graph over json rpc in Result updated event"

This reverts commit 2d63a625fd200d057bf6093e233f05dea440347c.

* Added string for localization

* Sending showplan graph over json rpc in Result updated event
Translating showplan graph into simple objects to be sent over JSON RPC

* Refactoring class

* Removing test warning

* Removing unused imports
Adding copyright

* Removing unused prop

* removing formatted string out .strings file

* Formatting files
Adding Errors in show plan graph

* Adding a separate event for execution plan

* Now sending mulitple graphs when a batch has more than one query.
This commit is contained in:
Aasim Khan
2021-11-16 22:33:28 -08:00
committed by GitHub
parent 482afd8427
commit 2e7bac5659
14 changed files with 680 additions and 66 deletions

View File

@@ -2,7 +2,9 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Collections.Generic;
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
using Microsoft.SqlTools.ServiceLayer.ShowPlan;
namespace Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.ExecuteRequests
{
@@ -35,9 +37,17 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.ExecuteReques
/// </summary>
public class ResultSetUpdatedEventParams : ResultSetEventParams
{
/// <summary>
/// Execution plans for statements in the current batch.
/// </summary>
public List<ExecutionPlanGraph> ExecutionPlans { get; set; }
/// <summary>
/// Error message for exception raised while generating execution plan.
/// </summary>
public string ExecutionPlanErrorMessage { get; set; }
}
public class ResultSetCompleteEvent
public class ResultSetCompleteEvent
{
public static string MethodName { get; } = "query/resultSetComplete";
@@ -46,7 +56,7 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.ExecuteReques
EventType<ResultSetCompleteEventParams>.Create(MethodName);
}
public class ResultSetAvailableEvent
public class ResultSetAvailableEvent
{
public static string MethodName { get; } = "query/resultSetAvailable";
@@ -55,7 +65,7 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.ExecuteReques
EventType<ResultSetAvailableEventParams>.Create(MethodName);
}
public class ResultSetUpdatedEvent
public class ResultSetUpdatedEvent
{
public static string MethodName { get; } = "query/resultSetUpdated";