Update ledger object SubTypes so they can be utilized for context menu handling (#1677)

This commit is contained in:
Jordan Hays
2022-09-08 12:24:36 -07:00
committed by GitHub
parent 8c9c3359c3
commit c2b0e33c9c
2 changed files with 13 additions and 7 deletions

View File

@@ -54,10 +54,16 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
try
{
Table? table = smoObject as Table;
if (table != null && IsPropertySupported("LedgerType", smoContext, table, CachedSmoProperties) &&
(table.LedgerType == LedgerTableType.AppendOnlyLedgerTable || table.LedgerType == LedgerTableType.UpdatableLedgerTable))
if (table != null && IsPropertySupported("LedgerType", smoContext, table, CachedSmoProperties))
{
return "Ledger";
if (table.LedgerType == LedgerTableType.AppendOnlyLedgerTable)
{
return "LedgerAppendOnly";
}
if (table.LedgerType == LedgerTableType.UpdatableLedgerTable)
{
return "LedgerUpdatable";
}
}
if (table != null && IsPropertySupported("TemporalType", smoContext, table, CachedSmoProperties) && table.TemporalType != TableTemporalType.None)
{
@@ -177,7 +183,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
public override string GetNodeSubType(object smoObject, SmoQueryContext smoContext)
{
return "Ledger";
return "LedgerDropped";
}
public override string GetNodePathName(object smoObject)