mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-25 09:35:37 -05:00
Adding property type and rules to compare properties in Execution Plans (#1522)
* Adding plan index in file info * Adding basic framework for prop comparison * Remoing none and and fixing some better values * Fixing file formatting * Fixing some formatting * Fixing casing * Fixing compilation * fixing compilation error
This commit is contained in:
@@ -63,7 +63,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan
|
||||
{
|
||||
overlays.Add(new Badge
|
||||
{
|
||||
Type = BadgeType.CRITICALWARNING,
|
||||
Type = BadgeType.CriticalWarning,
|
||||
Tooltip = SR.WarningOverlayTooltip
|
||||
});
|
||||
}
|
||||
@@ -71,7 +71,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan
|
||||
{
|
||||
overlays.Add(new Badge
|
||||
{
|
||||
Type = BadgeType.WARNING,
|
||||
Type = BadgeType.Warning,
|
||||
Tooltip = SR.WarningOverlayTooltip
|
||||
});
|
||||
}
|
||||
@@ -80,7 +80,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan
|
||||
{
|
||||
overlays.Add(new Badge
|
||||
{
|
||||
Type = BadgeType.PARALLELISM,
|
||||
Type = BadgeType.Parallelism,
|
||||
Tooltip = SR.ParallelismOverlayTooltip
|
||||
});
|
||||
}
|
||||
@@ -105,7 +105,32 @@ namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan
|
||||
var complexProperty = prop.Value as ExpandableObjectWrapper;
|
||||
if (complexProperty == null)
|
||||
{
|
||||
if(!prop.IsBrowsable)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
var propertyValue = prop.DisplayValue;
|
||||
var propertyDataType = PropertyValueDataType.String;
|
||||
switch (prop.Value)
|
||||
{
|
||||
case string stringValue:
|
||||
propertyDataType = PropertyValueDataType.String;
|
||||
break;
|
||||
case int integerValue:
|
||||
case long longIntegerValue:
|
||||
case uint unsignedIntegerValue:
|
||||
case ulong unsignedLongValue:
|
||||
case float floatValue:
|
||||
case double doubleValue:
|
||||
propertyDataType = PropertyValueDataType.Number;
|
||||
break;
|
||||
case bool booleanValue:
|
||||
propertyDataType = PropertyValueDataType.Boolean;
|
||||
break;
|
||||
default:
|
||||
propertyDataType = PropertyValueDataType.String;
|
||||
break;
|
||||
}
|
||||
propsList.Add(new ExecutionPlanGraphProperty()
|
||||
{
|
||||
Name = prop.DisplayName,
|
||||
@@ -113,7 +138,9 @@ namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan
|
||||
ShowInTooltip = prop.ShowInTooltip,
|
||||
DisplayOrder = prop.DisplayOrder,
|
||||
PositionAtBottom = prop.IsLongString,
|
||||
DisplayValue = GetPropertyDisplayValue(prop)
|
||||
DisplayValue = GetPropertyDisplayValue(prop),
|
||||
BetterValue = prop.BetterValue,
|
||||
DataType = propertyDataType
|
||||
});
|
||||
}
|
||||
else
|
||||
@@ -126,7 +153,9 @@ namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan
|
||||
ShowInTooltip = prop.ShowInTooltip,
|
||||
DisplayOrder = prop.DisplayOrder,
|
||||
PositionAtBottom = prop.IsLongString,
|
||||
DisplayValue = GetPropertyDisplayValue(prop)
|
||||
DisplayValue = GetPropertyDisplayValue(prop),
|
||||
BetterValue = prop.BetterValue,
|
||||
DataType = PropertyValueDataType.Nested
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user