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
|
||||
{
|
||||
get
|
||||
@@ -12197,6 +12213,12 @@ namespace Microsoft.SqlTools.ServiceLayer
|
||||
public const string FilterDurabilityTypeDescription = "FilterDurabilityTypeDescription";
|
||||
|
||||
|
||||
public const string FilterDurabilitySchemaOnly = "FilterDurabilitySchemaOnly";
|
||||
|
||||
|
||||
public const string FilterDurabilitySchemaAndData = "FilterDurabilitySchemaAndData";
|
||||
|
||||
|
||||
public const string FilterIsMemoryOptimized = "FilterIsMemoryOptimized";
|
||||
|
||||
|
||||
|
||||
@@ -1490,6 +1490,14 @@
|
||||
<value>Include or exclude objects based on the durability type.</value>
|
||||
<comment></comment>
|
||||
</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">
|
||||
<value>Is Memory Optimized</value>
|
||||
<comment></comment>
|
||||
|
||||
@@ -728,6 +728,8 @@ FilterOwner = Owner
|
||||
FilterOwnerDescription = Include or exclude objects based on the owner or part of an owner name.
|
||||
FilterDurabilityType = Durability Type
|
||||
FilterDurabilityTypeDescription = Include or exclude objects based on the durability type.
|
||||
FilterDurabilitySchemaOnly = Schema Only
|
||||
FilterDurabilitySchemaAndData = Schema and Data
|
||||
FilterIsMemoryOptimized = Is Memory Optimized
|
||||
FilterIsMemoryOptimizedDescription = Include or exclude objects based on whether the object is memory optimized.
|
||||
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>
|
||||
<note></note>
|
||||
</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>
|
||||
</file>
|
||||
</xliff>
|
||||
@@ -102,7 +102,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.Contracts
|
||||
/// <summary>
|
||||
/// The list of choices for the filter property if the type is choice
|
||||
/// </summary>
|
||||
public string[] Choices { get; set; }
|
||||
public NodeFilterPropertyChoice[] Choices { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -154,4 +154,21 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.Contracts
|
||||
/// </summary>
|
||||
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
|
||||
{
|
||||
Name = "DurabilityType",
|
||||
Name = "Durability",
|
||||
DisplayName = SR.FilterDurabilityType,
|
||||
Type = NodeFilterPropertyDataType.Choice,
|
||||
Description = SR.FilterDurabilityTypeDescription,
|
||||
Choices = new string[] {
|
||||
"SchemaAndData",
|
||||
"SchemaOnly",
|
||||
Choices = new NodeFilterPropertyChoice[] {
|
||||
new NodeFilterPropertyChoice {
|
||||
DisplayName = SR.FilterDurabilitySchemaAndData,
|
||||
Value = "1",
|
||||
},
|
||||
new NodeFilterPropertyChoice {
|
||||
DisplayName = SR.FilterDurabilitySchemaOnly,
|
||||
Value = "0",
|
||||
},
|
||||
}
|
||||
},
|
||||
new NodeFilterProperty
|
||||
@@ -1082,13 +1088,19 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
|
||||
},
|
||||
new NodeFilterProperty
|
||||
{
|
||||
Name = "DurabilityType",
|
||||
Name = "Durability",
|
||||
DisplayName = SR.FilterDurabilityType,
|
||||
Type = NodeFilterPropertyDataType.Choice,
|
||||
Description = SR.FilterDurabilityTypeDescription,
|
||||
Choices = new string[] {
|
||||
"SchemaAndData",
|
||||
"SchemaOnly",
|
||||
Choices = new NodeFilterPropertyChoice[] {
|
||||
new NodeFilterPropertyChoice {
|
||||
DisplayName = SR.FilterDurabilitySchemaAndData,
|
||||
Value = "1",
|
||||
},
|
||||
new NodeFilterPropertyChoice {
|
||||
DisplayName = SR.FilterDurabilitySchemaOnly,
|
||||
Value = "0",
|
||||
},
|
||||
}
|
||||
},
|
||||
new NodeFilterProperty
|
||||
@@ -1305,13 +1317,19 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
|
||||
},
|
||||
new NodeFilterProperty
|
||||
{
|
||||
Name = "DurabilityType",
|
||||
Name = "Durability",
|
||||
DisplayName = SR.FilterDurabilityType,
|
||||
Type = NodeFilterPropertyDataType.Choice,
|
||||
Description = SR.FilterDurabilityTypeDescription,
|
||||
Choices = new string[] {
|
||||
"SchemaAndData",
|
||||
"SchemaOnly",
|
||||
Choices = new NodeFilterPropertyChoice[] {
|
||||
new NodeFilterPropertyChoice {
|
||||
DisplayName = SR.FilterDurabilitySchemaAndData,
|
||||
Value = "1",
|
||||
},
|
||||
new NodeFilterPropertyChoice {
|
||||
DisplayName = SR.FilterDurabilitySchemaOnly,
|
||||
Value = "0",
|
||||
},
|
||||
}
|
||||
},
|
||||
new NodeFilterProperty
|
||||
@@ -1361,13 +1379,19 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
|
||||
},
|
||||
new NodeFilterProperty
|
||||
{
|
||||
Name = "DurabilityType",
|
||||
Name = "Durability",
|
||||
DisplayName = SR.FilterDurabilityType,
|
||||
Type = NodeFilterPropertyDataType.Choice,
|
||||
Description = SR.FilterDurabilityTypeDescription,
|
||||
Choices = new string[] {
|
||||
"SchemaAndData",
|
||||
"SchemaOnly",
|
||||
Choices = new NodeFilterPropertyChoice[] {
|
||||
new NodeFilterPropertyChoice {
|
||||
DisplayName = SR.FilterDurabilitySchemaAndData,
|
||||
Value = "1",
|
||||
},
|
||||
new NodeFilterPropertyChoice {
|
||||
DisplayName = SR.FilterDurabilitySchemaOnly,
|
||||
Value = "0",
|
||||
},
|
||||
}
|
||||
},
|
||||
new NodeFilterProperty
|
||||
|
||||
@@ -335,12 +335,16 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
|
||||
WriteLine(" Description = {0},", filterDescription);
|
||||
if(filterType == "choice")
|
||||
{
|
||||
var enumValues = filterDef.ChildNodes;
|
||||
WriteLine(" Choices = new string[] {");
|
||||
foreach (XmlElement enumValue in enumValues)
|
||||
var choiceValues = filterDef.ChildNodes;
|
||||
WriteLine(" Choices = new NodeFilterPropertyChoice[] {");
|
||||
foreach (XmlElement choice in choiceValues)
|
||||
{
|
||||
var enumValueName = enumValue.GetAttribute("Name");
|
||||
WriteLine(" \"{0}\",", enumValueName);
|
||||
var choiceName = choice.GetAttribute("LocLabel");
|
||||
var choiceValue = choice.GetAttribute("Value");
|
||||
WriteLine(" new NodeFilterPropertyChoice {");
|
||||
WriteLine(" DisplayName = {0},", choiceName);
|
||||
WriteLine(" Value = \"{0}\",", choiceValue);
|
||||
WriteLine(" },");
|
||||
|
||||
}
|
||||
WriteLine(" }");
|
||||
|
||||
@@ -576,7 +576,7 @@
|
||||
<Property>Name</Property>
|
||||
<Property>Schema</Property>
|
||||
<Property>Owner</Property>
|
||||
<Property>DurabilityType</Property>
|
||||
<Property>Durability</Property>
|
||||
<Property>IsMemoryOptimized</Property>
|
||||
<Property>CreateDate</Property>
|
||||
</FilterProperties>
|
||||
@@ -585,7 +585,7 @@
|
||||
<Property>Name</Property>
|
||||
<Property>Schema</Property>
|
||||
<Property>Owner</Property>
|
||||
<Property>DurabilityType</Property>
|
||||
<Property>Durability</Property>
|
||||
<Property>IsMemoryOptimized</Property>
|
||||
<Property>CreateDate</Property>
|
||||
</FilterProperties>
|
||||
@@ -594,7 +594,7 @@
|
||||
<Property>Name</Property>
|
||||
<Property>Schema</Property>
|
||||
<Property>Owner</Property>
|
||||
<Property>DurabilityType</Property>
|
||||
<Property>Durability</Property>
|
||||
<Property>IsMemoryOptimized</Property>
|
||||
<Property>CreateDate</Property>
|
||||
</FilterProperties>
|
||||
@@ -665,9 +665,9 @@
|
||||
<FilterProperty Name="Name" LocLabel="SR.FilterName" Type="string" Description="SR.FilterNameDescription"/>
|
||||
<FilterProperty Name="Schema" LocLabel="SR.FilterSchema" Type="string" Description="SR.FilterSchemaDescription"/>
|
||||
<FilterProperty Name="Owner" LocLabel="SR.FilterOwner" Type="string" Description="SR.FilterOwnerDescription"/>
|
||||
<FilterProperty Name="DurabilityType" LocLabel="SR.FilterDurabilityType" Type="choice" Description="SR.FilterDurabilityTypeDescription">
|
||||
<Value Name="SchemaAndData" LocLabel="SR.SchemaAndData"/>
|
||||
<Value Name="SchemaOnly" LocLabel="SR.SchemaOnly"/>
|
||||
<FilterProperty Name="Durability" LocLabel="SR.FilterDurabilityType" Type="choice" Description="SR.FilterDurabilityTypeDescription">
|
||||
<Value LocLabel="SR.FilterDurabilitySchemaAndData" Value="1"/>
|
||||
<Value LocLabel="SR.FilterDurabilitySchemaOnly" Value="0"/>
|
||||
</FilterProperty>
|
||||
<FilterProperty Name="IsMemoryOptimized" LocLabel="SR.FilterIsMemoryOptimized" Type="bool" Description="SR.FilterIsMemoryOptimizedDescription"/>
|
||||
<FilterProperty Name="CreateDate" LocLabel="SR.FilterCreateDate" Type="date" Description="SR.FilterCreateDateDescription"/>
|
||||
|
||||
Reference in New Issue
Block a user