mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-13 17:23:02 -05:00
Fixing durability type filter in OE (#2043)
* Fixing durability type filter in OE * Adding doc comment
This commit is contained in:
@@ -2445,6 +2445,22 @@ namespace Microsoft.SqlTools.ServiceLayer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static string FilterDurabilitySchemaOnly
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Keys.GetString(Keys.FilterDurabilitySchemaOnly);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string FilterDurabilitySchemaAndData
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Keys.GetString(Keys.FilterDurabilitySchemaAndData);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static string FilterIsMemoryOptimized
|
public static string FilterIsMemoryOptimized
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -12197,6 +12213,12 @@ namespace Microsoft.SqlTools.ServiceLayer
|
|||||||
public const string FilterDurabilityTypeDescription = "FilterDurabilityTypeDescription";
|
public const string FilterDurabilityTypeDescription = "FilterDurabilityTypeDescription";
|
||||||
|
|
||||||
|
|
||||||
|
public const string FilterDurabilitySchemaOnly = "FilterDurabilitySchemaOnly";
|
||||||
|
|
||||||
|
|
||||||
|
public const string FilterDurabilitySchemaAndData = "FilterDurabilitySchemaAndData";
|
||||||
|
|
||||||
|
|
||||||
public const string FilterIsMemoryOptimized = "FilterIsMemoryOptimized";
|
public const string FilterIsMemoryOptimized = "FilterIsMemoryOptimized";
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1490,6 +1490,14 @@
|
|||||||
<value>Include or exclude objects based on the durability type.</value>
|
<value>Include or exclude objects based on the durability type.</value>
|
||||||
<comment></comment>
|
<comment></comment>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="FilterDurabilitySchemaOnly" xml:space="preserve">
|
||||||
|
<value>Schema Only</value>
|
||||||
|
<comment></comment>
|
||||||
|
</data>
|
||||||
|
<data name="FilterDurabilitySchemaAndData" xml:space="preserve">
|
||||||
|
<value>Schema and Data</value>
|
||||||
|
<comment></comment>
|
||||||
|
</data>
|
||||||
<data name="FilterIsMemoryOptimized" xml:space="preserve">
|
<data name="FilterIsMemoryOptimized" xml:space="preserve">
|
||||||
<value>Is Memory Optimized</value>
|
<value>Is Memory Optimized</value>
|
||||||
<comment></comment>
|
<comment></comment>
|
||||||
|
|||||||
@@ -728,6 +728,8 @@ FilterOwner = Owner
|
|||||||
FilterOwnerDescription = Include or exclude objects based on the owner or part of an owner name.
|
FilterOwnerDescription = Include or exclude objects based on the owner or part of an owner name.
|
||||||
FilterDurabilityType = Durability Type
|
FilterDurabilityType = Durability Type
|
||||||
FilterDurabilityTypeDescription = Include or exclude objects based on the durability type.
|
FilterDurabilityTypeDescription = Include or exclude objects based on the durability type.
|
||||||
|
FilterDurabilitySchemaOnly = Schema Only
|
||||||
|
FilterDurabilitySchemaAndData = Schema and Data
|
||||||
FilterIsMemoryOptimized = Is Memory Optimized
|
FilterIsMemoryOptimized = Is Memory Optimized
|
||||||
FilterIsMemoryOptimizedDescription = Include or exclude objects based on whether the object is memory optimized.
|
FilterIsMemoryOptimizedDescription = Include or exclude objects based on whether the object is memory optimized.
|
||||||
FilterCreateDate = Create Date
|
FilterCreateDate = Create Date
|
||||||
|
|||||||
@@ -7227,6 +7227,16 @@ The Query Processor estimates that implementing the following index could improv
|
|||||||
<target state="new">Include or exclude objects based on whether the column is in a primary key.</target>
|
<target state="new">Include or exclude objects based on whether the column is in a primary key.</target>
|
||||||
<note></note>
|
<note></note>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
|
<trans-unit id="FilterDurabilitySchemaOnly">
|
||||||
|
<source>Schema Only</source>
|
||||||
|
<target state="new">Schema Only</target>
|
||||||
|
<note></note>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="FilterDurabilitySchemaAndData">
|
||||||
|
<source>Schema and Data</source>
|
||||||
|
<target state="new">Schema and Data</target>
|
||||||
|
<note></note>
|
||||||
|
</trans-unit>
|
||||||
</body>
|
</body>
|
||||||
</file>
|
</file>
|
||||||
</xliff>
|
</xliff>
|
||||||
@@ -102,7 +102,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.Contracts
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The list of choices for the filter property if the type is choice
|
/// The list of choices for the filter property if the type is choice
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string[] Choices { get; set; }
|
public NodeFilterPropertyChoice[] Choices { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -154,4 +154,21 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.Contracts
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public JToken Value { get; set; }
|
public JToken Value { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The choice for the filter property if the type is choice
|
||||||
|
/// </summary>
|
||||||
|
public class NodeFilterPropertyChoice
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The dropdown display value for the choice
|
||||||
|
/// </summary>
|
||||||
|
/// <value></value>
|
||||||
|
public string DisplayName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The value of the choice
|
||||||
|
/// </summary>
|
||||||
|
public string Value { get; set; }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -812,13 +812,19 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
|
|||||||
},
|
},
|
||||||
new NodeFilterProperty
|
new NodeFilterProperty
|
||||||
{
|
{
|
||||||
Name = "DurabilityType",
|
Name = "Durability",
|
||||||
DisplayName = SR.FilterDurabilityType,
|
DisplayName = SR.FilterDurabilityType,
|
||||||
Type = NodeFilterPropertyDataType.Choice,
|
Type = NodeFilterPropertyDataType.Choice,
|
||||||
Description = SR.FilterDurabilityTypeDescription,
|
Description = SR.FilterDurabilityTypeDescription,
|
||||||
Choices = new string[] {
|
Choices = new NodeFilterPropertyChoice[] {
|
||||||
"SchemaAndData",
|
new NodeFilterPropertyChoice {
|
||||||
"SchemaOnly",
|
DisplayName = SR.FilterDurabilitySchemaAndData,
|
||||||
|
Value = "1",
|
||||||
|
},
|
||||||
|
new NodeFilterPropertyChoice {
|
||||||
|
DisplayName = SR.FilterDurabilitySchemaOnly,
|
||||||
|
Value = "0",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
new NodeFilterProperty
|
new NodeFilterProperty
|
||||||
@@ -1082,13 +1088,19 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
|
|||||||
},
|
},
|
||||||
new NodeFilterProperty
|
new NodeFilterProperty
|
||||||
{
|
{
|
||||||
Name = "DurabilityType",
|
Name = "Durability",
|
||||||
DisplayName = SR.FilterDurabilityType,
|
DisplayName = SR.FilterDurabilityType,
|
||||||
Type = NodeFilterPropertyDataType.Choice,
|
Type = NodeFilterPropertyDataType.Choice,
|
||||||
Description = SR.FilterDurabilityTypeDescription,
|
Description = SR.FilterDurabilityTypeDescription,
|
||||||
Choices = new string[] {
|
Choices = new NodeFilterPropertyChoice[] {
|
||||||
"SchemaAndData",
|
new NodeFilterPropertyChoice {
|
||||||
"SchemaOnly",
|
DisplayName = SR.FilterDurabilitySchemaAndData,
|
||||||
|
Value = "1",
|
||||||
|
},
|
||||||
|
new NodeFilterPropertyChoice {
|
||||||
|
DisplayName = SR.FilterDurabilitySchemaOnly,
|
||||||
|
Value = "0",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
new NodeFilterProperty
|
new NodeFilterProperty
|
||||||
@@ -1305,13 +1317,19 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
|
|||||||
},
|
},
|
||||||
new NodeFilterProperty
|
new NodeFilterProperty
|
||||||
{
|
{
|
||||||
Name = "DurabilityType",
|
Name = "Durability",
|
||||||
DisplayName = SR.FilterDurabilityType,
|
DisplayName = SR.FilterDurabilityType,
|
||||||
Type = NodeFilterPropertyDataType.Choice,
|
Type = NodeFilterPropertyDataType.Choice,
|
||||||
Description = SR.FilterDurabilityTypeDescription,
|
Description = SR.FilterDurabilityTypeDescription,
|
||||||
Choices = new string[] {
|
Choices = new NodeFilterPropertyChoice[] {
|
||||||
"SchemaAndData",
|
new NodeFilterPropertyChoice {
|
||||||
"SchemaOnly",
|
DisplayName = SR.FilterDurabilitySchemaAndData,
|
||||||
|
Value = "1",
|
||||||
|
},
|
||||||
|
new NodeFilterPropertyChoice {
|
||||||
|
DisplayName = SR.FilterDurabilitySchemaOnly,
|
||||||
|
Value = "0",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
new NodeFilterProperty
|
new NodeFilterProperty
|
||||||
@@ -1361,13 +1379,19 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
|
|||||||
},
|
},
|
||||||
new NodeFilterProperty
|
new NodeFilterProperty
|
||||||
{
|
{
|
||||||
Name = "DurabilityType",
|
Name = "Durability",
|
||||||
DisplayName = SR.FilterDurabilityType,
|
DisplayName = SR.FilterDurabilityType,
|
||||||
Type = NodeFilterPropertyDataType.Choice,
|
Type = NodeFilterPropertyDataType.Choice,
|
||||||
Description = SR.FilterDurabilityTypeDescription,
|
Description = SR.FilterDurabilityTypeDescription,
|
||||||
Choices = new string[] {
|
Choices = new NodeFilterPropertyChoice[] {
|
||||||
"SchemaAndData",
|
new NodeFilterPropertyChoice {
|
||||||
"SchemaOnly",
|
DisplayName = SR.FilterDurabilitySchemaAndData,
|
||||||
|
Value = "1",
|
||||||
|
},
|
||||||
|
new NodeFilterPropertyChoice {
|
||||||
|
DisplayName = SR.FilterDurabilitySchemaOnly,
|
||||||
|
Value = "0",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
new NodeFilterProperty
|
new NodeFilterProperty
|
||||||
|
|||||||
@@ -335,12 +335,16 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
|
|||||||
WriteLine(" Description = {0},", filterDescription);
|
WriteLine(" Description = {0},", filterDescription);
|
||||||
if(filterType == "choice")
|
if(filterType == "choice")
|
||||||
{
|
{
|
||||||
var enumValues = filterDef.ChildNodes;
|
var choiceValues = filterDef.ChildNodes;
|
||||||
WriteLine(" Choices = new string[] {");
|
WriteLine(" Choices = new NodeFilterPropertyChoice[] {");
|
||||||
foreach (XmlElement enumValue in enumValues)
|
foreach (XmlElement choice in choiceValues)
|
||||||
{
|
{
|
||||||
var enumValueName = enumValue.GetAttribute("Name");
|
var choiceName = choice.GetAttribute("LocLabel");
|
||||||
WriteLine(" \"{0}\",", enumValueName);
|
var choiceValue = choice.GetAttribute("Value");
|
||||||
|
WriteLine(" new NodeFilterPropertyChoice {");
|
||||||
|
WriteLine(" DisplayName = {0},", choiceName);
|
||||||
|
WriteLine(" Value = \"{0}\",", choiceValue);
|
||||||
|
WriteLine(" },");
|
||||||
|
|
||||||
}
|
}
|
||||||
WriteLine(" }");
|
WriteLine(" }");
|
||||||
|
|||||||
@@ -576,7 +576,7 @@
|
|||||||
<Property>Name</Property>
|
<Property>Name</Property>
|
||||||
<Property>Schema</Property>
|
<Property>Schema</Property>
|
||||||
<Property>Owner</Property>
|
<Property>Owner</Property>
|
||||||
<Property>DurabilityType</Property>
|
<Property>Durability</Property>
|
||||||
<Property>IsMemoryOptimized</Property>
|
<Property>IsMemoryOptimized</Property>
|
||||||
<Property>CreateDate</Property>
|
<Property>CreateDate</Property>
|
||||||
</FilterProperties>
|
</FilterProperties>
|
||||||
@@ -585,7 +585,7 @@
|
|||||||
<Property>Name</Property>
|
<Property>Name</Property>
|
||||||
<Property>Schema</Property>
|
<Property>Schema</Property>
|
||||||
<Property>Owner</Property>
|
<Property>Owner</Property>
|
||||||
<Property>DurabilityType</Property>
|
<Property>Durability</Property>
|
||||||
<Property>IsMemoryOptimized</Property>
|
<Property>IsMemoryOptimized</Property>
|
||||||
<Property>CreateDate</Property>
|
<Property>CreateDate</Property>
|
||||||
</FilterProperties>
|
</FilterProperties>
|
||||||
@@ -594,7 +594,7 @@
|
|||||||
<Property>Name</Property>
|
<Property>Name</Property>
|
||||||
<Property>Schema</Property>
|
<Property>Schema</Property>
|
||||||
<Property>Owner</Property>
|
<Property>Owner</Property>
|
||||||
<Property>DurabilityType</Property>
|
<Property>Durability</Property>
|
||||||
<Property>IsMemoryOptimized</Property>
|
<Property>IsMemoryOptimized</Property>
|
||||||
<Property>CreateDate</Property>
|
<Property>CreateDate</Property>
|
||||||
</FilterProperties>
|
</FilterProperties>
|
||||||
@@ -665,9 +665,9 @@
|
|||||||
<FilterProperty Name="Name" LocLabel="SR.FilterName" Type="string" Description="SR.FilterNameDescription"/>
|
<FilterProperty Name="Name" LocLabel="SR.FilterName" Type="string" Description="SR.FilterNameDescription"/>
|
||||||
<FilterProperty Name="Schema" LocLabel="SR.FilterSchema" Type="string" Description="SR.FilterSchemaDescription"/>
|
<FilterProperty Name="Schema" LocLabel="SR.FilterSchema" Type="string" Description="SR.FilterSchemaDescription"/>
|
||||||
<FilterProperty Name="Owner" LocLabel="SR.FilterOwner" Type="string" Description="SR.FilterOwnerDescription"/>
|
<FilterProperty Name="Owner" LocLabel="SR.FilterOwner" Type="string" Description="SR.FilterOwnerDescription"/>
|
||||||
<FilterProperty Name="DurabilityType" LocLabel="SR.FilterDurabilityType" Type="choice" Description="SR.FilterDurabilityTypeDescription">
|
<FilterProperty Name="Durability" LocLabel="SR.FilterDurabilityType" Type="choice" Description="SR.FilterDurabilityTypeDescription">
|
||||||
<Value Name="SchemaAndData" LocLabel="SR.SchemaAndData"/>
|
<Value LocLabel="SR.FilterDurabilitySchemaAndData" Value="1"/>
|
||||||
<Value Name="SchemaOnly" LocLabel="SR.SchemaOnly"/>
|
<Value LocLabel="SR.FilterDurabilitySchemaOnly" Value="0"/>
|
||||||
</FilterProperty>
|
</FilterProperty>
|
||||||
<FilterProperty Name="IsMemoryOptimized" LocLabel="SR.FilterIsMemoryOptimized" Type="bool" Description="SR.FilterIsMemoryOptimizedDescription"/>
|
<FilterProperty Name="IsMemoryOptimized" LocLabel="SR.FilterIsMemoryOptimized" Type="bool" Description="SR.FilterIsMemoryOptimizedDescription"/>
|
||||||
<FilterProperty Name="CreateDate" LocLabel="SR.FilterCreateDate" Type="date" Description="SR.FilterCreateDateDescription"/>
|
<FilterProperty Name="CreateDate" LocLabel="SR.FilterCreateDate" Type="date" Description="SR.FilterCreateDateDescription"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user