set graph table types (#1633)

This commit is contained in:
Alan Ren
2022-08-12 15:57:01 -07:00
committed by GitHub
parent 4912f55dec
commit 57b4c25395
3 changed files with 24 additions and 5 deletions

View File

@@ -63,13 +63,20 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{ {
return "Temporal"; return "Temporal";
} }
if (table != null && IsPropertySupported("IsEdge", smoContext, table, CachedSmoProperties) && table.IsEdge)
{
return "GraphEdge";
}
if (table != null && IsPropertySupported("IsNode", smoContext, table, CachedSmoProperties) && table.IsNode)
{
return "GraphNode";
}
// TODO carbon issue 3125 enable "External" subtype once icon is ready. Otherwise will get missing icon here. // TODO carbon issue 3125 enable "External" subtype once icon is ready. Otherwise will get missing icon here.
// else if (table != null && IsPropertySupported("IsExternal", smoContext, table, CachedSmoProperties) && table.IsExternal) // else if (table != null && IsPropertySupported("IsExternal", smoContext, table, CachedSmoProperties) && table.IsExternal)
// { // {
// return "External"; // return "External";
// } // }
// return string.Empty; // return string.Empty;
} }
catch catch
{ {

View File

@@ -838,6 +838,16 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
Name = "IsExternal", Name = "IsExternal",
ValidFor = ValidForFlag.Sql2016|ValidForFlag.Sql2017|ValidForFlag.Sql2019|ValidForFlag.Sql2022|ValidForFlag.AzureV12|ValidForFlag.SqlOnDemand ValidFor = ValidForFlag.Sql2016|ValidForFlag.Sql2017|ValidForFlag.Sql2019|ValidForFlag.Sql2022|ValidForFlag.AzureV12|ValidForFlag.SqlOnDemand
}); });
properties.Add(new NodeSmoProperty
{
Name = "IsEdge",
ValidFor = ValidForFlag.Sql2017|ValidForFlag.Sql2019|ValidForFlag.Sql2022|ValidForFlag.AzureV12
});
properties.Add(new NodeSmoProperty
{
Name = "IsNode",
ValidFor = ValidForFlag.Sql2017|ValidForFlag.Sql2019|ValidForFlag.Sql2022|ValidForFlag.AzureV12
});
return properties; return properties;
} }
} }

View File

@@ -90,6 +90,8 @@
<Property Name="TemporalType" ValidFor="Sql2016|Sql2017|Sql2019|Sql2022|AzureV12"/> <Property Name="TemporalType" ValidFor="Sql2016|Sql2017|Sql2019|Sql2022|AzureV12"/>
<Property Name="LedgerType" ValidFor="Sql2022|AzureV12"/> <Property Name="LedgerType" ValidFor="Sql2022|AzureV12"/>
<Property Name="IsExternal" ValidFor="Sql2016|Sql2017|Sql2019|Sql2022|AzureV12|SqlOnDemand"/> <Property Name="IsExternal" ValidFor="Sql2016|Sql2017|Sql2019|Sql2022|AzureV12|SqlOnDemand"/>
<Property Name="IsEdge" ValidFor="Sql2017|Sql2019|Sql2022|AzureV12"/>
<Property Name="IsNode" ValidFor="Sql2017|Sql2019|Sql2022|AzureV12"/>
</Properties> </Properties>
<Child Name="SystemTables" IsSystemObject="1"/> <Child Name="SystemTables" IsSystemObject="1"/>
<Child Name="ExternalTables"/> <Child Name="ExternalTables"/>