The filter for the function is valid for all sql version except for DW (#574)

This commit is contained in:
Leila Lali
2018-01-08 09:34:44 -08:00
committed by GitHub
parent 104c484f3a
commit 4d4e0b1194
2 changed files with 8 additions and 5 deletions

View File

@@ -320,7 +320,7 @@
</Node> </Node>
<Node Name="StoredProcedureParameters" LocLabel="SR.SchemaHierarchy_Parameters" BaseClass="ModelBased" NodeType="StoredProcedureParameter" Strategy="StoredProcedureParameters" ChildQuerierTypes="SqlSubroutineParameter" DisableSort=""/> <Node Name="StoredProcedureParameters" LocLabel="SR.SchemaHierarchy_Parameters" BaseClass="ModelBased" NodeType="StoredProcedureParameter" Strategy="StoredProcedureParameters" ChildQuerierTypes="SqlSubroutineParameter" DisableSort=""/>
<Node Name="TableValuedFunctions" LocLabel="SR.SchemaHierarchy_TableValuedFunctions" BaseClass="ModelBased" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlUserDefinedFunction" TreeNode="TableValuedFunctionTreeNode"> <Node Name="TableValuedFunctions" LocLabel="SR.SchemaHierarchy_TableValuedFunctions" BaseClass="ModelBased" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlUserDefinedFunction" TreeNode="TableValuedFunctionTreeNode" ValidFor="NotSqlDw">
<Filters > <Filters >
<Filter Property="FunctionType" Type="Enum"> <Filter Property="FunctionType" Type="Enum">
<Value>UserDefinedFunctionType.Table</Value> <Value>UserDefinedFunctionType.Table</Value>
@@ -328,7 +328,7 @@
<Filter Property="IsSystemObject" Value="0" Type="bool" /> <Filter Property="IsSystemObject" Value="0" Type="bool" />
</Filters> </Filters>
</Node> </Node>
<Node Name="SystemTableValuedFunctions" LocLabel="SR.SchemaHierarchy_TableValuedFunctions" BaseClass="ModelBased" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlUserDefinedFunction" TreeNode="TableValuedFunctionTreeNode"> <Node Name="SystemTableValuedFunctions" LocLabel="SR.SchemaHierarchy_TableValuedFunctions" BaseClass="ModelBased" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlUserDefinedFunction" TreeNode="TableValuedFunctionTreeNode" ValidFor="NotSqlDw">
<Filters > <Filters >
<Filter Property="FunctionType" Type="Enum"> <Filter Property="FunctionType" Type="Enum">
<Value>UserDefinedFunctionType.Table</Value> <Value>UserDefinedFunctionType.Table</Value>
@@ -344,7 +344,7 @@
<Node Name="ScalarValuedFunctions" LocLabel="SR.SchemaHierarchy_ScalarValuedFunctions" BaseClass="ModelBased" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlUserDefinedFunction" TreeNode="ScalarValuedFunctionTreeNode" > <Node Name="ScalarValuedFunctions" LocLabel="SR.SchemaHierarchy_ScalarValuedFunctions" BaseClass="ModelBased" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlUserDefinedFunction" TreeNode="ScalarValuedFunctionTreeNode" >
<Filters> <Filters>
<Filter Property="FunctionType" Type="Enum" ValidFor="Sql2016|Sql2017|AzureV12"> <Filter Property="FunctionType" Type="Enum" ValidFor="NotSqlDw">
<Value>UserDefinedFunctionType.Scalar</Value> <Value>UserDefinedFunctionType.Scalar</Value>
</Filter> </Filter>
<Filter Property="IsSystemObject" Value="0" Type="bool" /> <Filter Property="IsSystemObject" Value="0" Type="bool" />
@@ -352,7 +352,7 @@
</Node> </Node>
<Node Name="SystemScalarValuedFunctions" LocLabel="SR.SchemaHierarchy_ScalarValuedFunctions" BaseClass="ModelBased" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlUserDefinedFunction" TreeNode="ScalarValuedFunctionTreeNode" > <Node Name="SystemScalarValuedFunctions" LocLabel="SR.SchemaHierarchy_ScalarValuedFunctions" BaseClass="ModelBased" Strategy="MultipleElementsOfType" ChildQuerierTypes="SqlUserDefinedFunction" TreeNode="ScalarValuedFunctionTreeNode" >
<Filters> <Filters>
<Filter Property="FunctionType" Type="Enum"> <Filter Property="FunctionType" Type="Enum" ValidFor="NotSqlDw">
<Value>UserDefinedFunctionType.Scalar</Value> <Value>UserDefinedFunctionType.Scalar</Value>
</Filter> </Filter>
<Filter Property="IsSystemObject" Value="1" Type="bool" /> <Filter Property="IsSystemObject" Value="1" Type="bool" />

View File

@@ -1778,6 +1778,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
NodeType = "Folder", NodeType = "Folder",
NodeTypeId = NodeTypes.TableValuedFunctions, NodeTypeId = NodeTypes.TableValuedFunctions,
IsSystemObject = false, IsSystemObject = false,
ValidFor = ValidForFlag.NotSqlDw,
SortPriority = SmoTreeNode.NextSortPriority, SortPriority = SmoTreeNode.NextSortPriority,
}); });
currentChildren.Add(new FolderNode { currentChildren.Add(new FolderNode {
@@ -1819,6 +1820,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
NodeType = "Folder", NodeType = "Folder",
NodeTypeId = NodeTypes.SystemTableValuedFunctions, NodeTypeId = NodeTypes.SystemTableValuedFunctions,
IsSystemObject = true, IsSystemObject = true,
ValidFor = ValidForFlag.NotSqlDw,
SortPriority = SmoTreeNode.NextSortPriority, SortPriority = SmoTreeNode.NextSortPriority,
}); });
currentChildren.Add(new FolderNode { currentChildren.Add(new FolderNode {
@@ -2870,7 +2872,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{ {
Property = "FunctionType", Property = "FunctionType",
Type = typeof(Enum), Type = typeof(Enum),
ValidFor = ValidForFlag.Sql2016|ValidForFlag.Sql2017|ValidForFlag.AzureV12, ValidFor = ValidForFlag.NotSqlDw,
Values = new List<object> Values = new List<object>
{ {
{ UserDefinedFunctionType.Scalar } { UserDefinedFunctionType.Scalar }
@@ -2917,6 +2919,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{ {
Property = "FunctionType", Property = "FunctionType",
Type = typeof(Enum), Type = typeof(Enum),
ValidFor = ValidForFlag.NotSqlDw,
Values = new List<object> Values = new List<object>
{ {
{ UserDefinedFunctionType.Scalar } { UserDefinedFunctionType.Scalar }