mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-15 17:23:32 -05:00
Dropped Ledger Views folder (#1626)
* adding dropped ledger views to the OE hierarchy with ledger view naming and icons * updating tests
This commit is contained in:
@@ -895,6 +895,13 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
|
||||
Type = typeof(bool),
|
||||
Values = new List<object> { 0 },
|
||||
});
|
||||
filters.Add(new NodePropertyFilter
|
||||
{
|
||||
Property = "IsDroppedLedgerView",
|
||||
Type = typeof(bool),
|
||||
ValidFor = ValidForFlag.Sql2022|ValidForFlag.AzureV12,
|
||||
Values = new List<object> { 0 },
|
||||
});
|
||||
return filters;
|
||||
}
|
||||
}
|
||||
@@ -909,6 +916,14 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
|
||||
IsMsShippedOwned = true,
|
||||
SortPriority = SmoTreeNode.NextSortPriority,
|
||||
});
|
||||
currentChildren.Add(new FolderNode {
|
||||
NodeValue = SR.SchemaHierarchy_DroppedLedgerViews,
|
||||
NodeType = "Folder",
|
||||
NodeTypeId = NodeTypes.DroppedLedgerViews,
|
||||
IsSystemObject = false,
|
||||
IsMsShippedOwned = true,
|
||||
SortPriority = SmoTreeNode.NextSortPriority,
|
||||
});
|
||||
}
|
||||
|
||||
internal override Type[] ChildQuerierTypes
|
||||
@@ -1837,6 +1852,44 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
|
||||
}
|
||||
}
|
||||
|
||||
[Export(typeof(ChildFactory))]
|
||||
[Shared]
|
||||
internal partial class DroppedLedgerViewsChildFactory : SmoChildFactoryBase
|
||||
{
|
||||
public override IEnumerable<string> ApplicableParents() { return new[] { "DroppedLedgerViews" }; }
|
||||
|
||||
public override IEnumerable<INodeFilter> Filters
|
||||
{
|
||||
get
|
||||
{
|
||||
var filters = new List<INodeFilter>();
|
||||
filters.Add(new NodePropertyFilter
|
||||
{
|
||||
Property = "IsDroppedLedgerView",
|
||||
Type = typeof(bool),
|
||||
ValidFor = ValidForFlag.Sql2022|ValidForFlag.AzureV12,
|
||||
Values = new List<object> { 1 },
|
||||
});
|
||||
return filters;
|
||||
}
|
||||
}
|
||||
|
||||
internal override Type[] ChildQuerierTypes
|
||||
{
|
||||
get
|
||||
{
|
||||
return new [] { typeof(SqlViewQuerier), };
|
||||
}
|
||||
}
|
||||
|
||||
public override TreeNode CreateChild(TreeNode parent, object context)
|
||||
{
|
||||
var child = new ViewTreeNode();
|
||||
InitializeChild(parent, child, context);
|
||||
return child;
|
||||
}
|
||||
}
|
||||
|
||||
[Export(typeof(ChildFactory))]
|
||||
[Shared]
|
||||
internal partial class ViewChildFactory : SmoChildFactoryBase
|
||||
|
||||
Reference in New Issue
Block a user