Feature execution plan settings and request implementation (#213)

* experimental showplan implementation (tools side only)

* fix for redundant massages from showplan executions

* moved showplan batches to new variables to make it less confusing

* returns showplan as part of batch summary with in each result summary

* cleaned up showplan resultsets

* cleaning up code and making showplan var optional

* changes all var names to showplan

* adding estimated support

* small fixes

* updatin var names and adding EPOptions struct

* adding ssms execution plan logic based on server types

* adding special actions logic

* removing redundant name changes

* execution plan query handler added

* cleaning up functions and data structures

* seperated special actions into its own class

* cleaning up special actions

* cleaning up code

* small new line fixes

* commenting out pre-yukon code

* removing all pre yukon code

* last yukon code commented out

* fixes broken tests

* adding related unit tests; integration tests incoming

* finishing tests and cleaning up code

* semantic changes

* cleaning up semantics

* changes and test fixes, also adding new exceptions into RS

* fixing special actions and cleaning up request logic

* fixing comment to trigger new build

* triggering another  build

* fixed up specialaction and added tests for it
This commit is contained in:
Raymond Martin
2017-01-17 19:37:42 -08:00
committed by GitHub
parent 0e29b181c9
commit 8a8d4338f1
20 changed files with 855 additions and 1 deletions

View File

@@ -1,6 +1,9 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts;
namespace Microsoft.SqlTools.ServiceLayer.SqlContext
{
/// <summary>
@@ -26,6 +29,16 @@ namespace Microsoft.SqlTools.ServiceLayer.SqlContext
/// </summary>
private const int DefaultMaxXmlCharsToStore = 2097152; // 2 MB - QE default
/// <summary>
/// Default selection of returning an actual XML showplan with all batches
/// Do not return any execution plan by default
/// </summary>
private ExecutionPlanOptions DefaultExecutionPlanOptions = new ExecutionPlanOptions()
{
IncludeActualExecutionPlanXml = false,
IncludeEstimatedExecutionPlanXml = false
};
#endregion
#region Member Variables
@@ -36,6 +49,8 @@ namespace Microsoft.SqlTools.ServiceLayer.SqlContext
private int? maxXmlCharsToStore;
private ExecutionPlanOptions? executionPlanOptions;
#endregion
#region Properties
@@ -61,6 +76,12 @@ namespace Microsoft.SqlTools.ServiceLayer.SqlContext
set { maxXmlCharsToStore = value; }
}
public ExecutionPlanOptions ExecutionPlanOptions
{
get { return executionPlanOptions ?? DefaultExecutionPlanOptions; }
set { executionPlanOptions = value; }
}
#endregion
#region Public Methods
@@ -74,6 +95,7 @@ namespace Microsoft.SqlTools.ServiceLayer.SqlContext
BatchSeparator = newSettings.BatchSeparator;
MaxCharsToStore = newSettings.MaxCharsToStore;
MaxXmlCharsToStore = newSettings.MaxXmlCharsToStore;
ExecutionPlanOptions = newSettings.ExecutionPlanOptions;
}
#endregion