mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-06 01:25:43 -05:00
Adding recommendations to query plan (#1373)
* Adding recommendations * Adding raw graph type in execution plan graph contracts * Fixing function name and concising string formatting * Converting localized string to a function * Using better names in contract props Formatting names in a better way * Getting rid of unnecessary getter, setters and private props * Fixing localized strings, comments and imports * Fixing some contracts * Fixing csproj formatting * Fixing var names * Fixing xml comments
This commit is contained in:
@@ -3,6 +3,9 @@
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
|
||||
{
|
||||
public class Description
|
||||
@@ -14,7 +17,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
|
||||
get { return this.title; }
|
||||
set
|
||||
{
|
||||
this.title = value.Trim().Replace(NewLine, " ");
|
||||
this.title = value.Trim().Replace(Environment.NewLine, " ");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +27,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
|
||||
set
|
||||
{
|
||||
string text = value.Trim();
|
||||
this.queryText = text.Replace(NewLine, " ");
|
||||
this.queryText = text.Replace(Environment.NewLine, " ");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +36,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
|
||||
get { return this.clusteredMode; }
|
||||
set
|
||||
{
|
||||
this.clusteredMode = value.Trim().Replace(NewLine, " ");
|
||||
this.clusteredMode = value.Trim().Replace(Environment.NewLine, " ");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,44 +48,25 @@ namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
|
||||
}
|
||||
}
|
||||
|
||||
public bool HasMissingIndex
|
||||
{
|
||||
get { return this.hasMissingIndex; }
|
||||
}
|
||||
|
||||
public string MissingIndexQueryText
|
||||
{
|
||||
get { return this.missingIndexQueryText; }
|
||||
}
|
||||
|
||||
public string MissingIndexImpact
|
||||
{
|
||||
get { return this.missingIndexImpact; }
|
||||
}
|
||||
|
||||
public string MissingIndexDatabase
|
||||
{
|
||||
get { return this.missingIndexDatabase; }
|
||||
}
|
||||
public List<MissingIndex> MissingIndices { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Member variables
|
||||
|
||||
private string title = string.Empty;
|
||||
private string queryText = string.Empty;
|
||||
private string toolTipQueryText = string.Empty;
|
||||
private string clusteredMode = string.Empty;
|
||||
private bool isClusteredMode = false;
|
||||
|
||||
private bool hasMissingIndex = false;
|
||||
private string missingIndexCaption = string.Empty; // actual caption text that will be displayed on the screen
|
||||
private string missingIndexQueryText = string.Empty; // create index query
|
||||
private string missingIndexImpact = string.Empty; // impact
|
||||
private string missingIndexDatabase = string.Empty; // database context
|
||||
|
||||
private const string NewLine = "\r\n";
|
||||
|
||||
private bool isClusteredMode = false;
|
||||
#endregion
|
||||
}
|
||||
|
||||
public class MissingIndex
|
||||
{
|
||||
public string MissingIndexCaption { get; set; }
|
||||
public string MissingIndexQueryText { get; set; }
|
||||
public string MissingIndexImpact { get; set; }
|
||||
public string MissingIndexDatabase { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user