mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-14 17:23:27 -05:00
Dropped Ledger Columns folders for ledger primary tables (#1688)
* dropped ledger columns strings, nodetypes, definition * work in progress * WIP- dropped columns folder showing for all tables * Dropped Ledger Column folder only for primary ledger tables * cleaning up * undoing changes to kusto layer * formatting * undoing formatting * undoing formatting * removing IsLedger property and instead filtering on NodeTypeId * updating column path test
This commit is contained in:
@@ -1644,6 +1644,34 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
|
||||
{
|
||||
public override IEnumerable<string> ApplicableParents() { return new[] { "Columns" }; }
|
||||
|
||||
public override IEnumerable<INodeFilter> Filters
|
||||
{
|
||||
get
|
||||
{
|
||||
var filters = new List<INodeFilter>();
|
||||
filters.Add(new NodePropertyFilter
|
||||
{
|
||||
Property = "IsDroppedLedgerColumn",
|
||||
Type = typeof(bool),
|
||||
ValidFor = ValidForFlag.Sql2022|ValidForFlag.AzureV12,
|
||||
Values = new List<object> { 0 },
|
||||
});
|
||||
return filters;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnExpandPopulateFolders(IList<TreeNode> currentChildren, TreeNode parent)
|
||||
{
|
||||
currentChildren.Add(new FolderNode {
|
||||
NodeValue = SR.SchemaHierarchy_DroppedLedgerColumns,
|
||||
NodeType = "Folder",
|
||||
NodeTypeId = NodeTypes.DroppedLedgerColumns,
|
||||
IsSystemObject = false,
|
||||
ValidFor = ValidForFlag.Sql2022|ValidForFlag.AzureV12,
|
||||
SortPriority = Int32.MaxValue,
|
||||
});
|
||||
}
|
||||
|
||||
internal override Type[] ChildQuerierTypes
|
||||
{
|
||||
get
|
||||
@@ -1663,6 +1691,46 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
|
||||
}
|
||||
}
|
||||
|
||||
[Export(typeof(ChildFactory))]
|
||||
[Shared]
|
||||
internal partial class DroppedLedgerColumnsChildFactory : SmoChildFactoryBase
|
||||
{
|
||||
public override IEnumerable<string> ApplicableParents() { return new[] { "DroppedLedgerColumns" }; }
|
||||
|
||||
public override IEnumerable<INodeFilter> Filters
|
||||
{
|
||||
get
|
||||
{
|
||||
var filters = new List<INodeFilter>();
|
||||
filters.Add(new NodePropertyFilter
|
||||
{
|
||||
Property = "IsDroppedLedgerColumn",
|
||||
Type = typeof(bool),
|
||||
ValidFor = ValidForFlag.Sql2022|ValidForFlag.AzureV12,
|
||||
Values = new List<object> { 1 },
|
||||
});
|
||||
return filters;
|
||||
}
|
||||
}
|
||||
|
||||
internal override Type[] ChildQuerierTypes
|
||||
{
|
||||
get
|
||||
{
|
||||
return new [] { typeof(SqlColumnQuerier), };
|
||||
}
|
||||
}
|
||||
|
||||
public override TreeNode CreateChild(TreeNode parent, object context)
|
||||
{
|
||||
var child = new SmoTreeNode();
|
||||
child.IsAlwaysLeaf = true;
|
||||
child.NodeType = "Column";
|
||||
InitializeChild(parent, child, context);
|
||||
return child;
|
||||
}
|
||||
}
|
||||
|
||||
[Export(typeof(ChildFactory))]
|
||||
[Shared]
|
||||
internal partial class KeysChildFactory : SmoChildFactoryBase
|
||||
|
||||
Reference in New Issue
Block a user