mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-14 01:25:40 -05:00
4499 lines
154 KiB
C#
4499 lines
154 KiB
C#
//
|
|
// Copyright (c) Microsoft. All rights reserved.
|
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
//
|
|
|
|
#nullable disable
|
|
|
|
// This file was generated by a T4 Template. Do not modify directly, instead update the SmoTreeNodesDefinition.xml file
|
|
// and re-run the T4 template. This can be done in Visual Studio by right-click in and choosing "Run Custom Tool",
|
|
// or from the command-line on any platform by running "build.cmd -Target=CodeGen" or "build.sh -Target=CodeGen".
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Composition;
|
|
using Microsoft.SqlServer.Management.Smo;
|
|
using Microsoft.SqlTools.ServiceLayer.ObjectExplorer.Nodes;
|
|
using Microsoft.SqlTools.ServiceLayer.SqlContext;
|
|
using Microsoft.SqlTools.ServiceLayer.Workspace;
|
|
|
|
namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
|
|
{
|
|
|
|
internal sealed partial class DatabaseTreeNode : SmoTreeNode
|
|
{
|
|
public DatabaseTreeNode() : base()
|
|
{
|
|
NodeValue = string.Empty;
|
|
this.NodeType = "Database";
|
|
this.NodeTypeId = NodeTypes.Database;
|
|
OnInitialize();
|
|
}
|
|
}
|
|
|
|
internal sealed partial class TableTreeNode : SmoTreeNode
|
|
{
|
|
public TableTreeNode() : base()
|
|
{
|
|
NodeValue = string.Empty;
|
|
this.NodeType = "Table";
|
|
this.NodeTypeId = NodeTypes.Table;
|
|
OnInitialize();
|
|
}
|
|
}
|
|
|
|
internal sealed partial class ViewTreeNode : SmoTreeNode
|
|
{
|
|
public ViewTreeNode() : base()
|
|
{
|
|
NodeValue = string.Empty;
|
|
this.NodeType = "View";
|
|
this.NodeTypeId = NodeTypes.View;
|
|
OnInitialize();
|
|
}
|
|
}
|
|
|
|
internal sealed partial class UserDefinedTableTypeTreeNode : SmoTreeNode
|
|
{
|
|
public UserDefinedTableTypeTreeNode() : base()
|
|
{
|
|
NodeValue = string.Empty;
|
|
this.NodeType = "UserDefinedTableType";
|
|
this.NodeTypeId = NodeTypes.UserDefinedTableType;
|
|
OnInitialize();
|
|
}
|
|
}
|
|
|
|
internal sealed partial class StoredProcedureTreeNode : SmoTreeNode
|
|
{
|
|
public StoredProcedureTreeNode() : base()
|
|
{
|
|
NodeValue = string.Empty;
|
|
this.NodeType = "StoredProcedure";
|
|
this.NodeTypeId = NodeTypes.StoredProcedure;
|
|
OnInitialize();
|
|
}
|
|
}
|
|
|
|
internal sealed partial class TableValuedFunctionTreeNode : SmoTreeNode
|
|
{
|
|
public TableValuedFunctionTreeNode() : base()
|
|
{
|
|
NodeValue = string.Empty;
|
|
this.NodeType = "TableValuedFunction";
|
|
this.NodeTypeId = NodeTypes.TableValuedFunction;
|
|
OnInitialize();
|
|
}
|
|
}
|
|
|
|
internal sealed partial class ScalarValuedFunctionTreeNode : SmoTreeNode
|
|
{
|
|
public ScalarValuedFunctionTreeNode() : base()
|
|
{
|
|
NodeValue = string.Empty;
|
|
this.NodeType = "ScalarValuedFunction";
|
|
this.NodeTypeId = NodeTypes.ScalarValuedFunction;
|
|
OnInitialize();
|
|
}
|
|
}
|
|
|
|
internal sealed partial class AggregateFunctionTreeNode : SmoTreeNode
|
|
{
|
|
public AggregateFunctionTreeNode() : base()
|
|
{
|
|
NodeValue = string.Empty;
|
|
this.NodeType = "AggregateFunction";
|
|
this.NodeTypeId = NodeTypes.AggregateFunction;
|
|
OnInitialize();
|
|
}
|
|
}
|
|
|
|
internal sealed partial class FileGroupTreeNode : SmoTreeNode
|
|
{
|
|
public FileGroupTreeNode() : base()
|
|
{
|
|
NodeValue = string.Empty;
|
|
this.NodeType = "FileGroup";
|
|
this.NodeTypeId = NodeTypes.FileGroup;
|
|
OnInitialize();
|
|
}
|
|
}
|
|
|
|
internal sealed partial class ExternalTableTreeNode : SmoTreeNode
|
|
{
|
|
public ExternalTableTreeNode() : base()
|
|
{
|
|
NodeValue = string.Empty;
|
|
this.NodeType = "ExternalTable";
|
|
this.NodeTypeId = NodeTypes.ExternalTable;
|
|
OnInitialize();
|
|
}
|
|
}
|
|
|
|
internal sealed partial class ExternalResourceTreeNode : SmoTreeNode
|
|
{
|
|
public ExternalResourceTreeNode() : base()
|
|
{
|
|
NodeValue = string.Empty;
|
|
this.NodeType = "ExternalResource";
|
|
this.NodeTypeId = NodeTypes.ExternalResource;
|
|
OnInitialize();
|
|
}
|
|
}
|
|
|
|
internal sealed partial class HistoryTableTreeNode : SmoTreeNode
|
|
{
|
|
public HistoryTableTreeNode() : base()
|
|
{
|
|
NodeValue = string.Empty;
|
|
this.NodeType = "HistoryTable";
|
|
this.NodeTypeId = NodeTypes.HistoryTable;
|
|
OnInitialize();
|
|
}
|
|
}
|
|
|
|
internal sealed partial class ExpandableSchemaTreeNode : SmoTreeNode
|
|
{
|
|
public ExpandableSchemaTreeNode() : base()
|
|
{
|
|
NodeValue = string.Empty;
|
|
this.NodeType = "Schema";
|
|
this.NodeTypeId = NodeTypes.ExpandableSchema;
|
|
OnInitialize();
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class ServerChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.Server) }; }
|
|
|
|
protected override void OnExpandPopulateFolders(IList<TreeNode> currentChildren, TreeNode parent)
|
|
{
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Databases,
|
|
NodeTypeId = NodeTypes.Databases,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Security,
|
|
NodeTypeId = NodeTypes.ServerLevelSecurity,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.All,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_ServerObjects,
|
|
NodeTypeId = NodeTypes.ServerLevelServerObjects,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.AllOnPrem,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class DatabasesChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.Databases) }; }
|
|
|
|
public override IEnumerable<INodeFilter> Filters
|
|
{
|
|
get
|
|
{
|
|
var filters = new List<INodeFilter>();
|
|
filters.Add(new NodePropertyFilter
|
|
{
|
|
Property = "IsSystemObject",
|
|
Type = typeof(bool),
|
|
Values = new List<object> { 0 },
|
|
});
|
|
return filters;
|
|
}
|
|
}
|
|
|
|
public override IEnumerable<NodeSmoProperty> SmoProperties
|
|
{
|
|
get
|
|
{
|
|
var properties = new List<NodeSmoProperty>();
|
|
properties.Add(new NodeSmoProperty
|
|
{
|
|
Name = "Status",
|
|
ValidFor = ValidForFlag.All
|
|
});
|
|
properties.Add(new NodeSmoProperty
|
|
{
|
|
Name = "IsLedger",
|
|
ValidFor = ValidForFlag.Sql2022OrHigher
|
|
});
|
|
return properties;
|
|
}
|
|
}
|
|
|
|
protected override void OnExpandPopulateFolders(IList<TreeNode> currentChildren, TreeNode parent)
|
|
{
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_SystemDatabases,
|
|
NodeTypeId = NodeTypes.SystemDatabases,
|
|
IsSystemObject = true,
|
|
ValidFor = ValidForFlag.All,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
}
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlDatabaseQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new DatabaseTreeNode();
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class ServerLevelSecurityChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.ServerLevelSecurity) }; }
|
|
|
|
protected override void OnExpandPopulateFolders(IList<TreeNode> currentChildren, TreeNode parent)
|
|
{
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_LinkedServerLogins,
|
|
NodeTypeId = NodeTypes.ServerLevelLinkedServerLogins,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.AllOnPrem,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Logins,
|
|
NodeTypeId = NodeTypes.ServerLevelLogins,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_ServerRoles,
|
|
NodeTypeId = NodeTypes.ServerLevelServerRoles,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.AllOnPrem,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Credentials,
|
|
NodeTypeId = NodeTypes.ServerLevelCredentials,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.AllOnPrem,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_CryptographicProviders,
|
|
NodeTypeId = NodeTypes.ServerLevelCryptographicProviders,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.AllOnPrem,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_ServerAudits,
|
|
NodeTypeId = NodeTypes.ServerLevelServerAudits,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.AllOnPrem,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_ServerAuditSpecifications,
|
|
NodeTypeId = NodeTypes.ServerLevelServerAuditSpecifications,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.AllOnPrem,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
}
|
|
|
|
internal override Type[] ChildQuerierTypes { get {return null;} }
|
|
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class ServerLevelServerObjectsChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.ServerLevelServerObjects) }; }
|
|
|
|
protected override void OnExpandPopulateFolders(IList<TreeNode> currentChildren, TreeNode parent)
|
|
{
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Endpoints,
|
|
NodeTypeId = NodeTypes.ServerLevelEndpoints,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.AllOnPrem,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_LinkedServers,
|
|
NodeTypeId = NodeTypes.ServerLevelLinkedServers,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_ServerTriggers,
|
|
NodeTypeId = NodeTypes.ServerLevelServerTriggers,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_ErrorMessages,
|
|
NodeTypeId = NodeTypes.ServerLevelErrorMessages,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
}
|
|
|
|
internal override Type[] ChildQuerierTypes { get {return null;} }
|
|
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class SystemDatabasesChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.SystemDatabases) }; }
|
|
|
|
public override IEnumerable<INodeFilter> Filters
|
|
{
|
|
get
|
|
{
|
|
var filters = new List<INodeFilter>();
|
|
filters.Add(new NodePropertyFilter
|
|
{
|
|
Property = "IsSystemObject",
|
|
Type = typeof(bool),
|
|
Values = new List<object> { 1 },
|
|
});
|
|
return filters;
|
|
}
|
|
}
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlDatabaseQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new DatabaseTreeNode();
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class ServerLevelLinkedServerLoginsChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.ServerLevelLinkedServerLogins) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlLinkedServerLoginQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "ServerLevelLinkedServerLogin";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class ServerLevelLoginsChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.ServerLevelLogins) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlLoginQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "ServerLevelLogin";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class ServerLevelServerRolesChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.ServerLevelServerRoles) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlServerRoleQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "ServerLevelServerRole";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class ServerLevelCredentialsChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.ServerLevelCredentials) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlCredentialQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "ServerLevelCredential";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class ServerLevelCryptographicProvidersChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.ServerLevelCryptographicProviders) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlCryptographicProviderQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "ServerLevelCryptographicProvider";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class ServerLevelServerAuditsChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.ServerLevelServerAudits) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlServerAuditQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "ServerLevelServerAudit";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class ServerLevelServerAuditSpecificationsChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.ServerLevelServerAuditSpecifications) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlServerAuditSpecificationQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "ServerLevelServerAuditSpecification";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class ServerLevelEndpointsChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.ServerLevelEndpoints) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlEndpointQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "ServerLevelEndpoint";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class ServerLevelLinkedServersChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.ServerLevelLinkedServers) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlLinkedServerQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "ServerLevelLinkedServer";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class ServerLevelServerTriggersChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.ServerLevelServerTriggers) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlServerDdlTriggerQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "ServerLevelServerTrigger";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class ServerLevelErrorMessagesChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.ServerLevelErrorMessages) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlErrorMessageQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "ServerLevelErrorMessage";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class DatabaseChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override bool PutFoldersAfterNodes => true;
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.Database) }; }
|
|
|
|
public override IEnumerable<INodeFilter> Filters
|
|
{
|
|
get
|
|
{
|
|
var filters = new List<INodeFilter>();
|
|
filters.Add(new NodePropertyFilter
|
|
{
|
|
Property = "Name",
|
|
Type = typeof(string),
|
|
IsNotFilter = true,
|
|
Values = new List<object> { "db_accessadmin" },
|
|
});
|
|
filters.Add(new NodePropertyFilter
|
|
{
|
|
Property = "Name",
|
|
Type = typeof(string),
|
|
IsNotFilter = true,
|
|
Values = new List<object> { "db_backupoperator" },
|
|
});
|
|
filters.Add(new NodePropertyFilter
|
|
{
|
|
Property = "Name",
|
|
Type = typeof(string),
|
|
IsNotFilter = true,
|
|
Values = new List<object> { "db_datareader" },
|
|
});
|
|
filters.Add(new NodePropertyFilter
|
|
{
|
|
Property = "Name",
|
|
Type = typeof(string),
|
|
IsNotFilter = true,
|
|
Values = new List<object> { "db_datawriter" },
|
|
});
|
|
filters.Add(new NodePropertyFilter
|
|
{
|
|
Property = "Name",
|
|
Type = typeof(string),
|
|
IsNotFilter = true,
|
|
Values = new List<object> { "db_ddladmin" },
|
|
});
|
|
filters.Add(new NodePropertyFilter
|
|
{
|
|
Property = "Name",
|
|
Type = typeof(string),
|
|
IsNotFilter = true,
|
|
Values = new List<object> { "db_denydatareader" },
|
|
});
|
|
filters.Add(new NodePropertyFilter
|
|
{
|
|
Property = "Name",
|
|
Type = typeof(string),
|
|
IsNotFilter = true,
|
|
Values = new List<object> { "db_denydatawriter" },
|
|
});
|
|
filters.Add(new NodePropertyFilter
|
|
{
|
|
Property = "Name",
|
|
Type = typeof(string),
|
|
IsNotFilter = true,
|
|
Values = new List<object> { "db_owner" },
|
|
});
|
|
filters.Add(new NodePropertyFilter
|
|
{
|
|
Property = "Name",
|
|
Type = typeof(string),
|
|
IsNotFilter = true,
|
|
Values = new List<object> { "db_securityadmin" },
|
|
});
|
|
return filters;
|
|
}
|
|
}
|
|
|
|
protected override void OnExpandPopulateFolders(IList<TreeNode> currentChildren, TreeNode parent)
|
|
{
|
|
if (!WorkspaceService<SqlToolsSettings>.Instance.CurrentSettings.SqlTools.ObjectExplorer.GroupBySchema)
|
|
{
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Tables,
|
|
NodeTypeId = NodeTypes.Tables,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
}
|
|
if (!WorkspaceService<SqlToolsSettings>.Instance.CurrentSettings.SqlTools.ObjectExplorer.GroupBySchema)
|
|
{
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Views,
|
|
NodeTypeId = NodeTypes.Views,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
}
|
|
if (!WorkspaceService<SqlToolsSettings>.Instance.CurrentSettings.SqlTools.ObjectExplorer.GroupBySchema)
|
|
{
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Synonyms,
|
|
NodeTypeId = NodeTypes.Synonyms,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.AllOnPrem|ValidForFlag.AzureV12,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
}
|
|
if (WorkspaceService<SqlToolsSettings>.Instance.CurrentSettings.SqlTools.ObjectExplorer.GroupBySchema)
|
|
{
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_BuiltInSchema,
|
|
NodeTypeId = NodeTypes.BuiltInSchemas,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
}
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Programmability,
|
|
NodeTypeId = NodeTypes.Programmability,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.NotSqlDemand,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_ExternalResources,
|
|
NodeTypeId = NodeTypes.ExternalResources,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.Sql2016OrHigher|ValidForFlag.AzureV12|ValidForFlag.SqlOnDemand,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_ServiceBroker,
|
|
NodeTypeId = NodeTypes.ServiceBroker,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.AllOnPrem,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Storage,
|
|
NodeTypeId = NodeTypes.Storage,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.AllOnPrem|ValidForFlag.AzureV12,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Security,
|
|
NodeTypeId = NodeTypes.Security,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
}
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
List<Type> conditionalTypesList = new List<Type>();
|
|
if (WorkspaceService<SqlToolsSettings>.Instance.CurrentSettings.SqlTools.ObjectExplorer.GroupBySchema)
|
|
{
|
|
conditionalTypesList.Add(typeof(SqlSchemaQuerier));
|
|
}
|
|
return conditionalTypesList.ToArray();
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new ExpandableSchemaTreeNode();
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class BuiltInSchemasChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.BuiltInSchemas) }; }
|
|
|
|
public override IEnumerable<INodeFilter> Filters
|
|
{
|
|
get
|
|
{
|
|
var filters = new List<INodeFilter>();
|
|
filters.Add(new NodeOrFilter
|
|
{
|
|
FilterList = new List<NodePropertyFilter> {
|
|
new NodePropertyFilter
|
|
{
|
|
Property = "Name",
|
|
Type = typeof(string),
|
|
Values = new List<object> { "db_accessadmin" },
|
|
},
|
|
new NodePropertyFilter
|
|
{
|
|
Property = "Name",
|
|
Type = typeof(string),
|
|
Values = new List<object> { "db_backupoperator" },
|
|
},
|
|
new NodePropertyFilter
|
|
{
|
|
Property = "Name",
|
|
Type = typeof(string),
|
|
Values = new List<object> { "db_datareader" },
|
|
},
|
|
new NodePropertyFilter
|
|
{
|
|
Property = "Name",
|
|
Type = typeof(string),
|
|
Values = new List<object> { "db_datawriter" },
|
|
},
|
|
new NodePropertyFilter
|
|
{
|
|
Property = "Name",
|
|
Type = typeof(string),
|
|
Values = new List<object> { "db_ddladmin" },
|
|
},
|
|
new NodePropertyFilter
|
|
{
|
|
Property = "Name",
|
|
Type = typeof(string),
|
|
Values = new List<object> { "db_denydatareader" },
|
|
},
|
|
new NodePropertyFilter
|
|
{
|
|
Property = "Name",
|
|
Type = typeof(string),
|
|
Values = new List<object> { "db_denydatawriter" },
|
|
},
|
|
new NodePropertyFilter
|
|
{
|
|
Property = "Name",
|
|
Type = typeof(string),
|
|
Values = new List<object> { "db_owner" },
|
|
},
|
|
new NodePropertyFilter
|
|
{
|
|
Property = "Name",
|
|
Type = typeof(string),
|
|
Values = new List<object> { "db_securityadmin" },
|
|
},
|
|
}
|
|
});
|
|
return filters;
|
|
}
|
|
}
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlSchemaQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new ExpandableSchemaTreeNode();
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class ExpandableSchemaChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.ExpandableSchema) }; }
|
|
|
|
protected override void OnExpandPopulateFolders(IList<TreeNode> currentChildren, TreeNode parent)
|
|
{
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Tables,
|
|
NodeTypeId = NodeTypes.Tables,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Views,
|
|
NodeTypeId = NodeTypes.Views,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Synonyms,
|
|
NodeTypeId = NodeTypes.Synonyms,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.AllOnPrem|ValidForFlag.AzureV12,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Programmability,
|
|
NodeTypeId = NodeTypes.ExpandableSchemaProgrammability,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.NotSqlDemand,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
}
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new Type[0];
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class TablesChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.Tables) }; }
|
|
|
|
public override IEnumerable<INodeFilter> Filters
|
|
{
|
|
get
|
|
{
|
|
var filters = new List<INodeFilter>();
|
|
filters.Add(new NodePropertyFilter
|
|
{
|
|
Property = "IsSystemObject",
|
|
Type = typeof(bool),
|
|
Values = new List<object> { 0 },
|
|
});
|
|
filters.Add(new NodePropertyFilter
|
|
{
|
|
Property = "TemporalType",
|
|
Type = typeof(Enum),
|
|
ValidFor = ValidForFlag.Sql2016OrHigher|ValidForFlag.AzureV12,
|
|
Values = new List<object>
|
|
{
|
|
{ TableTemporalType.None },
|
|
{ TableTemporalType.SystemVersioned }
|
|
}
|
|
});
|
|
filters.Add(new NodePropertyFilter
|
|
{
|
|
Property = "LedgerType",
|
|
Type = typeof(Enum),
|
|
ValidFor = ValidForFlag.Sql2022OrHigher|ValidForFlag.AzureV12,
|
|
Values = new List<object>
|
|
{
|
|
{ LedgerTableType.None },
|
|
{ LedgerTableType.AppendOnlyLedgerTable },
|
|
{ LedgerTableType.UpdatableLedgerTable }
|
|
}
|
|
});
|
|
filters.Add(new NodePropertyFilter
|
|
{
|
|
Property = "IsDroppedLedgerTable",
|
|
Type = typeof(bool),
|
|
ValidFor = ValidForFlag.Sql2022OrHigher|ValidForFlag.AzureV12,
|
|
Values = new List<object> { 0 },
|
|
});
|
|
return filters;
|
|
}
|
|
}
|
|
|
|
public override IEnumerable<NodeSmoProperty> SmoProperties
|
|
{
|
|
get
|
|
{
|
|
var properties = new List<NodeSmoProperty>();
|
|
properties.Add(new NodeSmoProperty
|
|
{
|
|
Name = "IsFileTable",
|
|
ValidFor = ValidForFlag.Sql2012OrHigher
|
|
});
|
|
properties.Add(new NodeSmoProperty
|
|
{
|
|
Name = "IsSystemVersioned",
|
|
ValidFor = ValidForFlag.Sql2016OrHigher|ValidForFlag.AzureV12
|
|
});
|
|
properties.Add(new NodeSmoProperty
|
|
{
|
|
Name = "TemporalType",
|
|
ValidFor = ValidForFlag.Sql2016OrHigher|ValidForFlag.AzureV12
|
|
});
|
|
properties.Add(new NodeSmoProperty
|
|
{
|
|
Name = "LedgerType",
|
|
ValidFor = ValidForFlag.Sql2022OrHigher|ValidForFlag.AzureV12
|
|
});
|
|
properties.Add(new NodeSmoProperty
|
|
{
|
|
Name = "IsExternal",
|
|
ValidFor = ValidForFlag.Sql2016OrHigher|ValidForFlag.AzureV12|ValidForFlag.SqlOnDemand
|
|
});
|
|
properties.Add(new NodeSmoProperty
|
|
{
|
|
Name = "IsEdge",
|
|
ValidFor = ValidForFlag.Sql2017OrHigher|ValidForFlag.AzureV12
|
|
});
|
|
properties.Add(new NodeSmoProperty
|
|
{
|
|
Name = "IsNode",
|
|
ValidFor = ValidForFlag.Sql2017OrHigher|ValidForFlag.AzureV12
|
|
});
|
|
return properties;
|
|
}
|
|
}
|
|
|
|
protected override void OnExpandPopulateFolders(IList<TreeNode> currentChildren, TreeNode parent)
|
|
{
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_SystemTables,
|
|
NodeTypeId = NodeTypes.SystemTables,
|
|
IsSystemObject = true,
|
|
IsMsShippedOwned = true,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_DroppedLedgerTables,
|
|
NodeTypeId = NodeTypes.DroppedLedgerTables,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.Sql2022OrHigher|ValidForFlag.AzureV12,
|
|
SortPriority = Int32.MaxValue,
|
|
});
|
|
}
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlTableQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new TableTreeNode();
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class ViewsChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.Views) }; }
|
|
|
|
public override IEnumerable<INodeFilter> Filters
|
|
{
|
|
get
|
|
{
|
|
var filters = new List<INodeFilter>();
|
|
filters.Add(new NodePropertyFilter
|
|
{
|
|
Property = "IsSystemObject",
|
|
Type = typeof(bool),
|
|
Values = new List<object> { 0 },
|
|
});
|
|
filters.Add(new NodePropertyFilter
|
|
{
|
|
Property = "IsDroppedLedgerView",
|
|
Type = typeof(bool),
|
|
ValidFor = ValidForFlag.Sql2022OrHigher|ValidForFlag.AzureV12,
|
|
Values = new List<object> { 0 },
|
|
});
|
|
return filters;
|
|
}
|
|
}
|
|
|
|
public override IEnumerable<NodeSmoProperty> SmoProperties
|
|
{
|
|
get
|
|
{
|
|
var properties = new List<NodeSmoProperty>();
|
|
properties.Add(new NodeSmoProperty
|
|
{
|
|
Name = "LedgerViewType",
|
|
ValidFor = ValidForFlag.Sql2022|ValidForFlag.AzureV12
|
|
});
|
|
return properties;
|
|
}
|
|
}
|
|
|
|
protected override void OnExpandPopulateFolders(IList<TreeNode> currentChildren, TreeNode parent)
|
|
{
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_SystemViews,
|
|
NodeTypeId = NodeTypes.SystemViews,
|
|
IsSystemObject = true,
|
|
IsMsShippedOwned = true,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_DroppedLedgerViews,
|
|
NodeTypeId = NodeTypes.DroppedLedgerViews,
|
|
IsSystemObject = false,
|
|
IsMsShippedOwned = true,
|
|
ValidFor = ValidForFlag.Sql2022OrHigher|ValidForFlag.AzureV12,
|
|
SortPriority = Int32.MaxValue,
|
|
});
|
|
}
|
|
|
|
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 SynonymsChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.Synonyms) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlSynonymQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "Synonym";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class ProgrammabilityChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.Programmability) }; }
|
|
|
|
protected override void OnExpandPopulateFolders(IList<TreeNode> currentChildren, TreeNode parent)
|
|
{
|
|
if (!WorkspaceService<SqlToolsSettings>.Instance.CurrentSettings.SqlTools.ObjectExplorer.GroupBySchema)
|
|
{
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_StoredProcedures,
|
|
NodeTypeId = NodeTypes.StoredProcedures,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
}
|
|
if (!WorkspaceService<SqlToolsSettings>.Instance.CurrentSettings.SqlTools.ObjectExplorer.GroupBySchema)
|
|
{
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Functions,
|
|
NodeTypeId = NodeTypes.Functions,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.NotSqlDemand,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
}
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_DatabaseTriggers,
|
|
NodeTypeId = NodeTypes.DatabaseTriggers,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.AllOnPrem|ValidForFlag.AzureV12,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Assemblies,
|
|
NodeTypeId = NodeTypes.Assemblies,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.AllOnPrem|ValidForFlag.AzureV12,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
if (!WorkspaceService<SqlToolsSettings>.Instance.CurrentSettings.SqlTools.ObjectExplorer.GroupBySchema)
|
|
{
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Types,
|
|
NodeTypeId = NodeTypes.Types,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.NotSqlDemand,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
}
|
|
if (!WorkspaceService<SqlToolsSettings>.Instance.CurrentSettings.SqlTools.ObjectExplorer.GroupBySchema)
|
|
{
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Sequences,
|
|
NodeTypeId = NodeTypes.Sequences,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.Sql2012OrHigher|ValidForFlag.AzureV12,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
}
|
|
}
|
|
|
|
internal override Type[] ChildQuerierTypes { get {return null;} }
|
|
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class ExpandableSchemaProgrammabilityChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.ExpandableSchemaProgrammability) }; }
|
|
|
|
protected override void OnExpandPopulateFolders(IList<TreeNode> currentChildren, TreeNode parent)
|
|
{
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_StoredProcedures,
|
|
NodeTypeId = NodeTypes.StoredProcedures,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Functions,
|
|
NodeTypeId = NodeTypes.Functions,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.NotSqlDemand,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Types,
|
|
NodeTypeId = NodeTypes.Types,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.NotSqlDemand,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Sequences,
|
|
NodeTypeId = NodeTypes.Sequences,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.Sql2012OrHigher|ValidForFlag.AzureV12,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
}
|
|
|
|
internal override Type[] ChildQuerierTypes { get {return null;} }
|
|
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class ExternalResourcesChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.ExternalResources) }; }
|
|
|
|
protected override void OnExpandPopulateFolders(IList<TreeNode> currentChildren, TreeNode parent)
|
|
{
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_ExternalDataSources,
|
|
NodeTypeId = NodeTypes.ExternalDataSources,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.Sql2016OrHigher|ValidForFlag.AzureV12|ValidForFlag.SqlOnDemand,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_ExternalFileFormats,
|
|
NodeTypeId = NodeTypes.ExternalFileFormats,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.Sql2016OrHigher|ValidForFlag.SqlOnDemand,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
}
|
|
|
|
internal override Type[] ChildQuerierTypes { get {return null;} }
|
|
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class ServiceBrokerChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.ServiceBroker) }; }
|
|
|
|
protected override void OnExpandPopulateFolders(IList<TreeNode> currentChildren, TreeNode parent)
|
|
{
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_MessageTypes,
|
|
NodeTypeId = NodeTypes.MessageTypes,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Contracts,
|
|
NodeTypeId = NodeTypes.Contracts,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Queues,
|
|
NodeTypeId = NodeTypes.Queues,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Services,
|
|
NodeTypeId = NodeTypes.Services,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_RemoteServiceBindings,
|
|
NodeTypeId = NodeTypes.RemoteServiceBindings,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_BrokerPriorities,
|
|
NodeTypeId = NodeTypes.BrokerPriorities,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.Sql2008OrHigher,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
}
|
|
|
|
internal override Type[] ChildQuerierTypes { get {return null;} }
|
|
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class StorageChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.Storage) }; }
|
|
|
|
protected override void OnExpandPopulateFolders(IList<TreeNode> currentChildren, TreeNode parent)
|
|
{
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_FileGroups,
|
|
NodeTypeId = NodeTypes.FileGroups,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_FullTextCatalogs,
|
|
NodeTypeId = NodeTypes.FullTextCatalogs,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_FullTextStopLists,
|
|
NodeTypeId = NodeTypes.FullTextStopLists,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.Sql2008OrHigher|ValidForFlag.AzureV12,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_LogFiles,
|
|
NodeTypeId = NodeTypes.SqlLogFiles,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_PartitionFunctions,
|
|
NodeTypeId = NodeTypes.PartitionFunctions,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_PartitionSchemes,
|
|
NodeTypeId = NodeTypes.PartitionSchemes,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_SearchPropertyLists,
|
|
NodeTypeId = NodeTypes.SearchPropertyLists,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.Sql2012OrHigher|ValidForFlag.AzureV12,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
}
|
|
|
|
internal override Type[] ChildQuerierTypes { get {return null;} }
|
|
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class SecurityChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.Security) }; }
|
|
|
|
protected override void OnExpandPopulateFolders(IList<TreeNode> currentChildren, TreeNode parent)
|
|
{
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Users,
|
|
NodeTypeId = NodeTypes.Users,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Roles,
|
|
NodeTypeId = NodeTypes.Roles,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Schemas,
|
|
NodeTypeId = NodeTypes.Schemas,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_AsymmetricKeys,
|
|
NodeTypeId = NodeTypes.AsymmetricKeys,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.AllOnPrem,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Certificates,
|
|
NodeTypeId = NodeTypes.Certificates,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.AllOnPrem,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_SymmetricKeys,
|
|
NodeTypeId = NodeTypes.SymmetricKeys,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.AllOnPrem,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_DatabaseScopedCredentials,
|
|
NodeTypeId = NodeTypes.DatabaseScopedCredentials,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.Sql2016OrHigher|ValidForFlag.AzureV12,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_DatabaseEncryptionKeys,
|
|
NodeTypeId = NodeTypes.DatabaseEncryptionKeys,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.Sql2008OrHigher,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_MasterKeys,
|
|
NodeTypeId = NodeTypes.MasterKeys,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.AllOnPrem,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_DatabaseAuditSpecifications,
|
|
NodeTypeId = NodeTypes.DatabaseAuditSpecifications,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.Sql2008OrHigher,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_SecurityPolicies,
|
|
NodeTypeId = NodeTypes.SecurityPolicies,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.Sql2016OrHigher|ValidForFlag.AzureV12,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_AlwaysEncryptedKeys,
|
|
NodeTypeId = NodeTypes.AlwaysEncryptedKeys,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.Sql2016OrHigher|ValidForFlag.AzureV12,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
}
|
|
|
|
internal override Type[] ChildQuerierTypes { get {return null;} }
|
|
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class SystemTablesChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.SystemTables) }; }
|
|
|
|
public override IEnumerable<INodeFilter> Filters
|
|
{
|
|
get
|
|
{
|
|
var filters = new List<INodeFilter>();
|
|
filters.Add(new NodePropertyFilter
|
|
{
|
|
Property = "IsSystemObject",
|
|
Type = typeof(bool),
|
|
Values = new List<object> { 1 },
|
|
});
|
|
return filters;
|
|
}
|
|
}
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlTableQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new TableTreeNode();
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class DroppedLedgerTablesChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.DroppedLedgerTables) }; }
|
|
|
|
public override IEnumerable<INodeFilter> Filters
|
|
{
|
|
get
|
|
{
|
|
var filters = new List<INodeFilter>();
|
|
filters.Add(new NodePropertyFilter
|
|
{
|
|
Property = "IsDroppedLedgerTable",
|
|
Type = typeof(bool),
|
|
Values = new List<object> { 1 },
|
|
});
|
|
return filters;
|
|
}
|
|
}
|
|
|
|
public override IEnumerable<NodeSmoProperty> SmoProperties
|
|
{
|
|
get
|
|
{
|
|
var properties = new List<NodeSmoProperty>();
|
|
properties.Add(new NodeSmoProperty
|
|
{
|
|
Name = "IsDroppedLedgerTable",
|
|
ValidFor = ValidForFlag.Sql2022OrHigher|ValidForFlag.AzureV12
|
|
});
|
|
return properties;
|
|
}
|
|
}
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlTableQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new TableTreeNode();
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class TableChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.Table) }; }
|
|
|
|
public override IEnumerable<INodeFilter> Filters
|
|
{
|
|
get
|
|
{
|
|
var filters = new List<INodeFilter>();
|
|
filters.Add(new NodeOrFilter
|
|
{
|
|
FilterList = new List<NodePropertyFilter> {
|
|
new NodePropertyFilter
|
|
{
|
|
Property = "TemporalType",
|
|
Type = typeof(Enum),
|
|
TypeToReverse = typeof(SqlHistoryTableQuerier),
|
|
ValidFor = ValidForFlag.Sql2016OrHigher|ValidForFlag.AzureV12,
|
|
Values = new List<object>
|
|
{
|
|
{ TableTemporalType.HistoryTable }
|
|
}
|
|
},
|
|
new NodePropertyFilter
|
|
{
|
|
Property = "LedgerType",
|
|
Type = typeof(Enum),
|
|
TypeToReverse = typeof(SqlHistoryTableQuerier),
|
|
ValidFor = ValidForFlag.Sql2022OrHigher|ValidForFlag.AzureV12,
|
|
Values = new List<object>
|
|
{
|
|
{ LedgerTableType.HistoryTable }
|
|
}
|
|
},
|
|
}
|
|
});
|
|
return filters;
|
|
}
|
|
}
|
|
|
|
public override IEnumerable<NodeSmoProperty> SmoProperties
|
|
{
|
|
get
|
|
{
|
|
var properties = new List<NodeSmoProperty>();
|
|
properties.Add(new NodeSmoProperty
|
|
{
|
|
Name = "LedgerType",
|
|
ValidFor = ValidForFlag.Sql2022OrHigher|ValidForFlag.AzureV12
|
|
});
|
|
properties.Add(new NodeSmoProperty
|
|
{
|
|
Name = "TemporalType",
|
|
ValidFor = ValidForFlag.Sql2016OrHigher|ValidForFlag.AzureV12
|
|
});
|
|
return properties;
|
|
}
|
|
}
|
|
|
|
protected override void OnExpandPopulateFolders(IList<TreeNode> currentChildren, TreeNode parent)
|
|
{
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Columns,
|
|
NodeTypeId = NodeTypes.Columns,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Keys,
|
|
NodeTypeId = NodeTypes.Keys,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.NotSqlDw,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Constraints,
|
|
NodeTypeId = NodeTypes.Constraints,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Triggers,
|
|
NodeTypeId = NodeTypes.Triggers,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.AllOnPrem|ValidForFlag.AzureV12,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Indexes,
|
|
NodeTypeId = NodeTypes.Indexes,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.NotSqlDemand,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Statistics,
|
|
NodeTypeId = NodeTypes.Statistics,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.NotSqlDemand,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
}
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlTableQuerier), typeof(SqlHistoryTableQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new HistoryTableTreeNode();
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class HistoryTableChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.HistoryTable) }; }
|
|
|
|
protected override void OnExpandPopulateFolders(IList<TreeNode> currentChildren, TreeNode parent)
|
|
{
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Columns,
|
|
NodeTypeId = NodeTypes.Columns,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Constraints,
|
|
NodeTypeId = NodeTypes.Constraints,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Indexes,
|
|
NodeTypeId = NodeTypes.Indexes,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.NotSqlDemand,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Statistics,
|
|
NodeTypeId = NodeTypes.Statistics,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.NotSqlDemand,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
}
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new Type[0];
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "Table";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class ExternalTableChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.ExternalTable) }; }
|
|
|
|
protected override void OnExpandPopulateFolders(IList<TreeNode> currentChildren, TreeNode parent)
|
|
{
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Columns,
|
|
NodeTypeId = NodeTypes.Columns,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Statistics,
|
|
NodeTypeId = NodeTypes.Statistics,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.NotSqlDemand,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
}
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlTableQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "Table";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class ColumnsChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.Columns) }; }
|
|
|
|
public override IEnumerable<INodeFilter> Filters
|
|
{
|
|
get
|
|
{
|
|
var filters = new List<INodeFilter>();
|
|
filters.Add(new NodePropertyFilter
|
|
{
|
|
Property = "IsDroppedLedgerColumn",
|
|
Type = typeof(bool),
|
|
ValidFor = ValidForFlag.Sql2022OrHigher|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,
|
|
NodeTypeId = NodeTypes.DroppedLedgerColumns,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.Sql2022OrHigher|ValidForFlag.AzureV12,
|
|
SortPriority = Int32.MaxValue,
|
|
});
|
|
}
|
|
|
|
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";
|
|
child.SortPriority = SmoTreeNode.NextSortPriority;
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class DroppedLedgerColumnsChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.DroppedLedgerColumns) }; }
|
|
|
|
public override IEnumerable<INodeFilter> Filters
|
|
{
|
|
get
|
|
{
|
|
var filters = new List<INodeFilter>();
|
|
filters.Add(new NodePropertyFilter
|
|
{
|
|
Property = "IsDroppedLedgerColumn",
|
|
Type = typeof(bool),
|
|
ValidFor = ValidForFlag.Sql2022OrHigher|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
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.Keys) }; }
|
|
|
|
public override IEnumerable<INodeFilter> Filters
|
|
{
|
|
get
|
|
{
|
|
var filters = new List<INodeFilter>();
|
|
filters.Add(new NodePropertyFilter
|
|
{
|
|
Property = "IndexKeyType",
|
|
Type = typeof(Enum),
|
|
TypeToReverse = typeof(SqlIndexQuerier),
|
|
ValidFor = ValidForFlag.AllOnPrem|ValidForFlag.AzureV12,
|
|
Values = new List<object>
|
|
{
|
|
{ IndexKeyType.DriPrimaryKey },
|
|
{ IndexKeyType.DriUniqueKey }
|
|
}
|
|
});
|
|
return filters;
|
|
}
|
|
}
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlIndexQuerier), typeof(SqlForeignKeyConstraintQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "Key";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class ConstraintsChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.Constraints) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlDefaultConstraintQuerier), typeof(SqlCheckQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "Constraint";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class TriggersChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.Triggers) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlDmlTriggerQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "Trigger";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class IndexesChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.Indexes) }; }
|
|
|
|
public override IEnumerable<INodeFilter> Filters
|
|
{
|
|
get
|
|
{
|
|
var filters = new List<INodeFilter>();
|
|
filters.Add(new NodePropertyFilter
|
|
{
|
|
Property = "IndexKeyType",
|
|
Type = typeof(Enum),
|
|
TypeToReverse = typeof(SqlIndexQuerier),
|
|
ValidFor = ValidForFlag.AllOnPrem|ValidForFlag.AzureV12,
|
|
Values = new List<object>
|
|
{
|
|
{ IndexKeyType.None },
|
|
{ IndexKeyType.DriPrimaryKey },
|
|
{ IndexKeyType.DriUniqueKey }
|
|
}
|
|
});
|
|
return filters;
|
|
}
|
|
}
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlIndexQuerier), typeof(SqlFullTextIndexQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "Index";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class StatisticsChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.Statistics) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlStatisticQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "Statistic";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class SystemViewsChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.SystemViews) }; }
|
|
|
|
public override IEnumerable<INodeFilter> Filters
|
|
{
|
|
get
|
|
{
|
|
var filters = new List<INodeFilter>();
|
|
filters.Add(new NodePropertyFilter
|
|
{
|
|
Property = "IsSystemObject",
|
|
Type = typeof(bool),
|
|
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 DroppedLedgerViewsChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.DroppedLedgerViews) }; }
|
|
|
|
public override IEnumerable<INodeFilter> Filters
|
|
{
|
|
get
|
|
{
|
|
var filters = new List<INodeFilter>();
|
|
filters.Add(new NodePropertyFilter
|
|
{
|
|
Property = "IsDroppedLedgerView",
|
|
Type = typeof(bool),
|
|
ValidFor = ValidForFlag.Sql2022OrHigher|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
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.View) }; }
|
|
|
|
protected override void OnExpandPopulateFolders(IList<TreeNode> currentChildren, TreeNode parent)
|
|
{
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Columns,
|
|
NodeTypeId = NodeTypes.Columns,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Triggers,
|
|
NodeTypeId = NodeTypes.Triggers,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.AllOnPrem|ValidForFlag.AzureV12,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Indexes,
|
|
NodeTypeId = NodeTypes.Indexes,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.NotSqlDemand,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Statistics,
|
|
NodeTypeId = NodeTypes.Statistics,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.NotSqlDemand,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
}
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new Type[0];
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "View";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class FunctionsChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.Functions) }; }
|
|
|
|
protected override void OnExpandPopulateFolders(IList<TreeNode> currentChildren, TreeNode parent)
|
|
{
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_SystemFunctions,
|
|
NodeTypeId = NodeTypes.SystemFunctions,
|
|
IsSystemObject = true,
|
|
IsMsShippedOwned = true,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_TableValuedFunctions,
|
|
NodeTypeId = NodeTypes.TableValuedFunctions,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.NotSqlDw,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_ScalarValuedFunctions,
|
|
NodeTypeId = NodeTypes.ScalarValuedFunctions,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_AggregateFunctions,
|
|
NodeTypeId = NodeTypes.AggregateFunctions,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.AllOnPrem|ValidForFlag.AzureV12,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
}
|
|
|
|
internal override Type[] ChildQuerierTypes { get {return null;} }
|
|
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class SystemFunctionsChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.SystemFunctions) }; }
|
|
|
|
protected override void OnExpandPopulateFolders(IList<TreeNode> currentChildren, TreeNode parent)
|
|
{
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_TableValuedFunctions,
|
|
NodeTypeId = NodeTypes.SystemTableValuedFunctions,
|
|
IsSystemObject = true,
|
|
ValidFor = ValidForFlag.NotSqlDw,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_ScalarValuedFunctions,
|
|
NodeTypeId = NodeTypes.SystemScalarValuedFunctions,
|
|
IsSystemObject = true,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
}
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new Type[0];
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new TableValuedFunctionTreeNode();
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class DatabaseTriggersChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.DatabaseTriggers) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlDatabaseDdlTriggerQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "DatabaseTrigger";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class AssembliesChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.Assemblies) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlAssemblyQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "Assembly";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class TypesChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.Types) }; }
|
|
|
|
protected override void OnExpandPopulateFolders(IList<TreeNode> currentChildren, TreeNode parent)
|
|
{
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_SystemDataTypes,
|
|
NodeTypeId = NodeTypes.SystemDataTypes,
|
|
IsSystemObject = true,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_UserDefinedDataTypes,
|
|
NodeTypeId = NodeTypes.UserDefinedDataTypes,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.AllOnPrem|ValidForFlag.AzureV12,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_UserDefinedTableTypes,
|
|
NodeTypeId = NodeTypes.UserDefinedTableTypes,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.Sql2008OrHigher|ValidForFlag.AzureV12,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_UserDefinedTypes,
|
|
NodeTypeId = NodeTypes.UserDefinedTypes,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.AllOnPrem|ValidForFlag.AzureV12,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_XMLSchemaCollections,
|
|
NodeTypeId = NodeTypes.XmlSchemaCollections,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.AllOnPrem|ValidForFlag.AzureV12,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
}
|
|
|
|
internal override Type[] ChildQuerierTypes { get {return null;} }
|
|
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class SequencesChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.Sequences) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlSequenceQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "Sequence";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class SystemDataTypesChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.SystemDataTypes) }; }
|
|
|
|
protected override void OnExpandPopulateFolders(IList<TreeNode> currentChildren, TreeNode parent)
|
|
{
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_SystemExactNumerics,
|
|
NodeTypeId = NodeTypes.SystemExactNumerics,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_SystemApproximateNumerics,
|
|
NodeTypeId = NodeTypes.SystemApproximateNumerics,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_SystemDateAndTime,
|
|
NodeTypeId = NodeTypes.SystemDateAndTimes,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_SystemCharacterStrings,
|
|
NodeTypeId = NodeTypes.SystemCharacterStrings,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_SystemUnicodeCharacterStrings,
|
|
NodeTypeId = NodeTypes.SystemUnicodeCharacterStrings,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_SystemBinaryStrings,
|
|
NodeTypeId = NodeTypes.SystemBinaryStrings,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_SystemOtherDataTypes,
|
|
NodeTypeId = NodeTypes.SystemOtherDataTypes,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_SystemCLRDataTypes,
|
|
NodeTypeId = NodeTypes.SystemClrDataTypes,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.All,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_SystemSpatialDataTypes,
|
|
NodeTypeId = NodeTypes.SystemSpatialDataTypes,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.Sql2008OrHigher|ValidForFlag.AzureV12,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
}
|
|
|
|
internal override Type[] ChildQuerierTypes { get {return null;} }
|
|
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class UserDefinedDataTypesChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.UserDefinedDataTypes) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlUserDefinedDataTypeQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "UserDefinedDataType";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class UserDefinedTableTypesChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.UserDefinedTableTypes) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlUserDefinedTableTypeQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new UserDefinedTableTypeTreeNode();
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class UserDefinedTypesChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.UserDefinedTypes) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlUserDefinedTypeQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "UserDefinedType";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class XmlSchemaCollectionsChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.XmlSchemaCollections) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlXmlSchemaCollectionQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "XmlSchemaCollection";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class UserDefinedTableTypeChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.UserDefinedTableType) }; }
|
|
|
|
protected override void OnExpandPopulateFolders(IList<TreeNode> currentChildren, TreeNode parent)
|
|
{
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Columns,
|
|
NodeTypeId = NodeTypes.UserDefinedTableTypeColumns,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Keys,
|
|
NodeTypeId = NodeTypes.UserDefinedTableTypeKeys,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Constraints,
|
|
NodeTypeId = NodeTypes.UserDefinedTableTypeConstraints,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
}
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new Type[0];
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "UserDefinedTableType";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class UserDefinedTableTypeColumnsChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.UserDefinedTableTypeColumns) }; }
|
|
|
|
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 = "UserDefinedTableTypeColumn";
|
|
child.SortPriority = SmoTreeNode.NextSortPriority;
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class UserDefinedTableTypeKeysChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.UserDefinedTableTypeKeys) }; }
|
|
|
|
public override IEnumerable<INodeFilter> Filters
|
|
{
|
|
get
|
|
{
|
|
var filters = new List<INodeFilter>();
|
|
filters.Add(new NodePropertyFilter
|
|
{
|
|
Property = "IndexKeyType",
|
|
Type = typeof(Enum),
|
|
TypeToReverse = typeof(SqlIndexQuerier),
|
|
ValidFor = ValidForFlag.Sql2016OrHigher|ValidForFlag.AzureV12,
|
|
Values = new List<object>
|
|
{
|
|
{ IndexKeyType.DriPrimaryKey },
|
|
{ IndexKeyType.DriUniqueKey }
|
|
}
|
|
});
|
|
return filters;
|
|
}
|
|
}
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlIndexQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "UserDefinedTableTypeKey";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class UserDefinedTableTypeConstraintsChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.UserDefinedTableTypeConstraints) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlDefaultConstraintQuerier), typeof(SqlCheckQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "UserDefinedTableTypeConstraint";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class SystemExactNumericsChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.SystemExactNumerics) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlBuiltInTypeQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "SystemExactNumeric";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class SystemApproximateNumericsChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.SystemApproximateNumerics) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlBuiltInTypeQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "SystemApproximateNumeric";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class SystemDateAndTimesChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.SystemDateAndTimes) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlBuiltInTypeQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "SystemDateAndTime";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class SystemCharacterStringsChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.SystemCharacterStrings) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlBuiltInTypeQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "SystemCharacterString";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class SystemUnicodeCharacterStringsChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.SystemUnicodeCharacterStrings) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlBuiltInTypeQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "SystemUnicodeCharacterString";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class SystemBinaryStringsChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.SystemBinaryStrings) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlBuiltInTypeQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "SystemBinaryString";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class SystemOtherDataTypesChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.SystemOtherDataTypes) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlBuiltInTypeQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "SystemOtherDataType";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class SystemClrDataTypesChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.SystemClrDataTypes) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlBuiltInTypeQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "SystemClrDataType";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class SystemSpatialDataTypesChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.SystemSpatialDataTypes) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlBuiltInTypeQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "SystemSpatialDataType";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class ExternalDataSourcesChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.ExternalDataSources) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlExternalDataSourceQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "ExternalDataSource";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class ExternalFileFormatsChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.ExternalFileFormats) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlExternalFileFormatQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "ExternalFileFormat";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class StoredProceduresChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.StoredProcedures) }; }
|
|
|
|
public override IEnumerable<INodeFilter> Filters
|
|
{
|
|
get
|
|
{
|
|
var filters = new List<INodeFilter>();
|
|
filters.Add(new NodePropertyFilter
|
|
{
|
|
Property = "IsSystemObject",
|
|
Type = typeof(bool),
|
|
Values = new List<object> { 0 },
|
|
});
|
|
return filters;
|
|
}
|
|
}
|
|
|
|
protected override void OnExpandPopulateFolders(IList<TreeNode> currentChildren, TreeNode parent)
|
|
{
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_SystemStoredProcedures,
|
|
NodeTypeId = NodeTypes.SystemStoredProcedures,
|
|
IsSystemObject = true,
|
|
IsMsShippedOwned = true,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
}
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlProcedureQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new StoredProcedureTreeNode();
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class SystemStoredProceduresChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.SystemStoredProcedures) }; }
|
|
|
|
public override IEnumerable<INodeFilter> Filters
|
|
{
|
|
get
|
|
{
|
|
var filters = new List<INodeFilter>();
|
|
filters.Add(new NodePropertyFilter
|
|
{
|
|
Property = "IsSystemObject",
|
|
Type = typeof(bool),
|
|
Values = new List<object> { 1 },
|
|
});
|
|
return filters;
|
|
}
|
|
}
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlProcedureQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new StoredProcedureTreeNode();
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class StoredProcedureChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.StoredProcedure) }; }
|
|
|
|
protected override void OnExpandPopulateFolders(IList<TreeNode> currentChildren, TreeNode parent)
|
|
{
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Parameters,
|
|
NodeTypeId = NodeTypes.StoredProcedureParameters,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
}
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new Type[0];
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "StoredProcedure";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class StoredProcedureParametersChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.StoredProcedureParameters) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlSubroutineParameterQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "StoredProcedureParameter";
|
|
child.SortPriority = SmoTreeNode.NextSortPriority;
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class TableValuedFunctionsChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.TableValuedFunctions) }; }
|
|
|
|
public override IEnumerable<INodeFilter> Filters
|
|
{
|
|
get
|
|
{
|
|
var filters = new List<INodeFilter>();
|
|
filters.Add(new NodePropertyFilter
|
|
{
|
|
Property = "FunctionType",
|
|
Type = typeof(Enum),
|
|
Values = new List<object>
|
|
{
|
|
{ UserDefinedFunctionType.Table },
|
|
{ UserDefinedFunctionType.Inline }
|
|
}
|
|
});
|
|
filters.Add(new NodePropertyFilter
|
|
{
|
|
Property = "IsSystemObject",
|
|
Type = typeof(bool),
|
|
Values = new List<object> { 0 },
|
|
});
|
|
return filters;
|
|
}
|
|
}
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlUserDefinedFunctionQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new TableValuedFunctionTreeNode();
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class SystemTableValuedFunctionsChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.SystemTableValuedFunctions) }; }
|
|
|
|
public override IEnumerable<INodeFilter> Filters
|
|
{
|
|
get
|
|
{
|
|
var filters = new List<INodeFilter>();
|
|
filters.Add(new NodePropertyFilter
|
|
{
|
|
Property = "FunctionType",
|
|
Type = typeof(Enum),
|
|
Values = new List<object>
|
|
{
|
|
{ UserDefinedFunctionType.Table },
|
|
{ UserDefinedFunctionType.Inline }
|
|
}
|
|
});
|
|
filters.Add(new NodePropertyFilter
|
|
{
|
|
Property = "IsSystemObject",
|
|
Type = typeof(bool),
|
|
Values = new List<object> { 1 },
|
|
});
|
|
return filters;
|
|
}
|
|
}
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlUserDefinedFunctionQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new TableValuedFunctionTreeNode();
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class TableValuedFunctionChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.TableValuedFunction) }; }
|
|
|
|
protected override void OnExpandPopulateFolders(IList<TreeNode> currentChildren, TreeNode parent)
|
|
{
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Parameters,
|
|
NodeTypeId = NodeTypes.TableValuedFunctionParameters,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
}
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new Type[0];
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "TableValuedFunction";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class TableValuedFunctionParametersChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.TableValuedFunctionParameters) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlSubroutineParameterQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "TableValuedFunctionParameter";
|
|
child.SortPriority = SmoTreeNode.NextSortPriority;
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class ScalarValuedFunctionsChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.ScalarValuedFunctions) }; }
|
|
|
|
public override IEnumerable<INodeFilter> Filters
|
|
{
|
|
get
|
|
{
|
|
var filters = new List<INodeFilter>();
|
|
filters.Add(new NodePropertyFilter
|
|
{
|
|
Property = "FunctionType",
|
|
Type = typeof(Enum),
|
|
ValidFor = ValidForFlag.NotSqlDw,
|
|
Values = new List<object>
|
|
{
|
|
{ UserDefinedFunctionType.Scalar }
|
|
}
|
|
});
|
|
filters.Add(new NodePropertyFilter
|
|
{
|
|
Property = "IsSystemObject",
|
|
Type = typeof(bool),
|
|
Values = new List<object> { 0 },
|
|
});
|
|
return filters;
|
|
}
|
|
}
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlUserDefinedFunctionQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new ScalarValuedFunctionTreeNode();
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class SystemScalarValuedFunctionsChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.SystemScalarValuedFunctions) }; }
|
|
|
|
public override IEnumerable<INodeFilter> Filters
|
|
{
|
|
get
|
|
{
|
|
var filters = new List<INodeFilter>();
|
|
filters.Add(new NodePropertyFilter
|
|
{
|
|
Property = "FunctionType",
|
|
Type = typeof(Enum),
|
|
ValidFor = ValidForFlag.NotSqlDw,
|
|
Values = new List<object>
|
|
{
|
|
{ UserDefinedFunctionType.Scalar }
|
|
}
|
|
});
|
|
filters.Add(new NodePropertyFilter
|
|
{
|
|
Property = "IsSystemObject",
|
|
Type = typeof(bool),
|
|
Values = new List<object> { 1 },
|
|
});
|
|
return filters;
|
|
}
|
|
}
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlUserDefinedFunctionQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new ScalarValuedFunctionTreeNode();
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class ScalarValuedFunctionChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.ScalarValuedFunction) }; }
|
|
|
|
protected override void OnExpandPopulateFolders(IList<TreeNode> currentChildren, TreeNode parent)
|
|
{
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Parameters,
|
|
NodeTypeId = NodeTypes.ScalarValuedFunctionParameters,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
}
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new Type[0];
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "ScalarValuedFunction";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class ScalarValuedFunctionParametersChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.ScalarValuedFunctionParameters) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlSubroutineParameterQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "ScalarValuedFunctionParameter";
|
|
child.SortPriority = SmoTreeNode.NextSortPriority;
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class AggregateFunctionsChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.AggregateFunctions) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlUserDefinedAggregateQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new AggregateFunctionTreeNode();
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class AggregateFunctionChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.AggregateFunction) }; }
|
|
|
|
protected override void OnExpandPopulateFolders(IList<TreeNode> currentChildren, TreeNode parent)
|
|
{
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_Parameters,
|
|
NodeTypeId = NodeTypes.AggregateFunctionParameters,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
}
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new Type[0];
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "AggregateFunction";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class AggregateFunctionParametersChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.AggregateFunctionParameters) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlSubroutineParameterQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "AggregateFunctionParameter";
|
|
child.SortPriority = SmoTreeNode.NextSortPriority;
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class RemoteServiceBindingsChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.RemoteServiceBindings) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlRemoteServiceBindingQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "RemoteServiceBinding";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class BrokerPrioritiesChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.BrokerPriorities) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlBrokerPriorityQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "BrokerPriority";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class FileGroupsChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.FileGroups) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlFileGroupQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new FileGroupTreeNode();
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class FullTextCatalogsChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.FullTextCatalogs) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlFullTextCatalogQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "FullTextCatalog";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class FullTextStopListsChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.FullTextStopLists) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlFullTextStopListQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "FullTextStopList";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class SqlLogFilesChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.SqlLogFiles) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlFileQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "SqlLogFile";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class PartitionFunctionsChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.PartitionFunctions) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlPartitionFunctionQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "PartitionFunction";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class PartitionSchemesChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.PartitionSchemes) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlPartitionSchemeQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "PartitionScheme";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class SearchPropertyListsChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.SearchPropertyLists) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlSearchPropertyListQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "SearchPropertyList";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class FileGroupChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.FileGroup) }; }
|
|
|
|
protected override void OnExpandPopulateFolders(IList<TreeNode> currentChildren, TreeNode parent)
|
|
{
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_FilegroupFiles,
|
|
NodeTypeId = NodeTypes.FileGroupFiles,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
}
|
|
|
|
internal override Type[] ChildQuerierTypes { get {return null;} }
|
|
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class FileGroupFilesChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.FileGroupFiles) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlFileQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "FileGroupFile";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class UsersChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.Users) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlUserQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "User";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class RolesChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.Roles) }; }
|
|
|
|
protected override void OnExpandPopulateFolders(IList<TreeNode> currentChildren, TreeNode parent)
|
|
{
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_DatabaseRoles,
|
|
NodeTypeId = NodeTypes.DatabaseRoles,
|
|
IsSystemObject = false,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_ApplicationRoles,
|
|
NodeTypeId = NodeTypes.ApplicationRoles,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.AllOnPrem|ValidForFlag.AzureV12,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
}
|
|
|
|
internal override Type[] ChildQuerierTypes { get {return null;} }
|
|
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class SchemasChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.Schemas) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlSchemaQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "Schema";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class AsymmetricKeysChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.AsymmetricKeys) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlAsymmetricKeyQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "AsymmetricKey";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class CertificatesChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.Certificates) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlCertificateQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "Certificate";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class SymmetricKeysChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.SymmetricKeys) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlSymmetricKeyQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "SymmetricKey";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class DatabaseEncryptionKeysChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.DatabaseEncryptionKeys) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlDatabaseEncryptionKeyQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "DatabaseEncryptionKey";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class MasterKeysChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.MasterKeys) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlMasterKeyQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "MasterKey";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class DatabaseAuditSpecificationsChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.DatabaseAuditSpecifications) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlDatabaseAuditSpecificationQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "DatabaseAuditSpecification";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class SecurityPoliciesChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.SecurityPolicies) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlSecurityPolicyQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "SecurityPolicy";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class DatabaseScopedCredentialsChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.DatabaseScopedCredentials) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlDatabaseCredentialQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "DatabaseScopedCredential";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class AlwaysEncryptedKeysChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.AlwaysEncryptedKeys) }; }
|
|
|
|
protected override void OnExpandPopulateFolders(IList<TreeNode> currentChildren, TreeNode parent)
|
|
{
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_ColumnMasterKeys,
|
|
NodeTypeId = NodeTypes.ColumnMasterKeys,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.Sql2016OrHigher|ValidForFlag.AzureV12,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_ColumnEncryptionKeys,
|
|
NodeTypeId = NodeTypes.ColumnEncryptionKeys,
|
|
IsSystemObject = false,
|
|
ValidFor = ValidForFlag.Sql2016OrHigher|ValidForFlag.AzureV12,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
}
|
|
|
|
internal override Type[] ChildQuerierTypes { get {return null;} }
|
|
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
return null;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class DatabaseRolesChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.DatabaseRoles) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlRoleQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "DatabaseRole";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class ApplicationRolesChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.ApplicationRoles) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlApplicationRoleQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "ApplicationRole";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class ColumnMasterKeysChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.ColumnMasterKeys) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlColumnMasterKeyQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "ColumnMasterKey";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class ColumnEncryptionKeysChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.ColumnEncryptionKeys) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlColumnEncryptionKeyQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "ColumnEncryptionKey";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class MessageTypesChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.MessageTypes) }; }
|
|
|
|
protected override void OnExpandPopulateFolders(IList<TreeNode> currentChildren, TreeNode parent)
|
|
{
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_SystemMessageTypes,
|
|
NodeTypeId = NodeTypes.SystemMessageTypes,
|
|
IsSystemObject = true,
|
|
IsMsShippedOwned = true,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
}
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlMessageTypeQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "MessageType";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class SystemMessageTypesChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.SystemMessageTypes) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlMessageTypeQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "SystemMessageType";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class ContractsChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.Contracts) }; }
|
|
|
|
protected override void OnExpandPopulateFolders(IList<TreeNode> currentChildren, TreeNode parent)
|
|
{
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_SystemContracts,
|
|
NodeTypeId = NodeTypes.SystemContracts,
|
|
IsSystemObject = true,
|
|
IsMsShippedOwned = true,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
}
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlContractQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "Contract";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class SystemContractsChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.SystemContracts) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlContractQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "SystemContract";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class QueuesChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.Queues) }; }
|
|
|
|
protected override void OnExpandPopulateFolders(IList<TreeNode> currentChildren, TreeNode parent)
|
|
{
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_SystemQueues,
|
|
NodeTypeId = NodeTypes.SystemQueues,
|
|
IsSystemObject = true,
|
|
IsMsShippedOwned = true,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
}
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlQueueQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "Queue";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class SystemQueuesChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.SystemQueues) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlQueueQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "SystemQueue";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class ServicesChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.Services) }; }
|
|
|
|
protected override void OnExpandPopulateFolders(IList<TreeNode> currentChildren, TreeNode parent)
|
|
{
|
|
currentChildren.Add(new FolderNode {
|
|
NodeValue = SR.SchemaHierarchy_SystemServices,
|
|
NodeTypeId = NodeTypes.SystemServices,
|
|
IsSystemObject = true,
|
|
IsMsShippedOwned = true,
|
|
SortPriority = SmoTreeNode.NextSortPriority,
|
|
});
|
|
}
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlServiceQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "Service";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
[Export(typeof(ChildFactory))]
|
|
[Shared]
|
|
internal partial class SystemServicesChildFactory : SmoChildFactoryBase
|
|
{
|
|
public override IEnumerable<string> ApplicableParents() { return new[] { nameof(NodeTypes.SystemServices) }; }
|
|
|
|
internal override Type[] ChildQuerierTypes
|
|
{
|
|
get
|
|
{
|
|
return new [] { typeof(SqlServiceQuerier), };
|
|
}
|
|
}
|
|
|
|
public override TreeNode CreateChild(TreeNode parent, object context)
|
|
{
|
|
var child = new SmoTreeNode();
|
|
child.IsAlwaysLeaf = true;
|
|
child.NodeType = "SystemService";
|
|
InitializeChild(parent, child, context);
|
|
return child;
|
|
}
|
|
}
|
|
|
|
}
|
|
|