Skip to content

Commit fa34c85

Browse files
authored
Adding database level connection filters. (#2538)
1 parent e3ccac3 commit fa34c85

File tree

5 files changed

+602
-766
lines changed

5 files changed

+602
-766
lines changed

src/Microsoft.SqlTools.SqlCore/ObjectExplorer/SmoModel/DatabaseTreeNode.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public DatabaseTreeNode(ServerNode serverNode, string databaseName) : this()
3333
db.Refresh();
3434
}
3535
CacheInfoFromModel(db);
36+
this.FilterProperties = NodeFilterPropertyHelper.GetFilterProperties(this.GetContext(), NodeTypes.Database);
3637
}
3738

3839
/// <summary>

src/Microsoft.SqlTools.SqlCore/ObjectExplorer/SmoModel/SmoChildFactoryBase.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ public override IEnumerable<TreeNode> Expand(TreeNode parent, bool refresh, stri
4343
OnExpandPopulateNonFolders(allChildren, parent, refresh, name, cancellationToken, filters);
4444
}
4545

46+
foreach (var child in allChildren)
47+
{
48+
child.FilterProperties = NodeFilterPropertyHelper.GetFilterProperties(parent.GetContext(), child.NodeTypeId);
49+
}
50+
4651
OnBeginAsyncOperations(parent);
4752
}
4853
catch (Exception ex)

0 commit comments

Comments
 (0)