SqlHierarchyId.GetReparentedValue Method (SqlHierarchyId, SqlHierarchyId)
Applies To: SQL Server 2016 Preview
Gets a value representing the location of a new SqlHierarchyId node that has a path from newRoot equal to the path from oldRoot to this, effectively moving this to the new location*.*
Namespace: Microsoft.SqlServer.Types
Assembly: Microsoft.SqlServer.Types (in Microsoft.SqlServer.Types.dll)
Syntax
[SqlMethodAttribute(DataAccess = DataAccessKind.None, SystemDataAccess = SystemDataAccessKind.None,
InvokeIfReceiverIsNull = false, OnNullCall = false, IsDeterministic = true,
IsPrecise = true, IsMutator = false)]
public SqlHierarchyId GetReparentedValue(
SqlHierarchyId oldRoot,
SqlHierarchyId newRoot
)
public:
[SqlMethodAttribute(DataAccess = DataAccessKind::None, SystemDataAccess = SystemDataAccessKind::None,
InvokeIfReceiverIsNull = false, OnNullCall = false, IsDeterministic = true,
IsPrecise = true, IsMutator = false)]
SqlHierarchyId GetReparentedValue(
SqlHierarchyId oldRoot,
SqlHierarchyId newRoot
)
[<SqlMethodAttribute(DataAccess = DataAccessKind.None, SystemDataAccess = SystemDataAccessKind.None,
InvokeIfReceiverIsNull = false, OnNullCall = false, IsDeterministic = true,
IsPrecise = true, IsMutator = false)>]
member GetReparentedValue :
oldRoot:SqlHierarchyId *
newRoot:SqlHierarchyId -> SqlHierarchyId
<SqlMethodAttribute(DataAccess := DataAccessKind.None, SystemDataAccess := SystemDataAccessKind.None,
InvokeIfReceiverIsNull := False, OnNullCall := False, IsDeterministic := True,
IsPrecise := True, IsMutator := False)>
Public Function GetReparentedValue (
oldRoot As SqlHierarchyId,
newRoot As SqlHierarchyId
) As SqlHierarchyId
Parameters
oldRoot
Type: Microsoft.SqlServer.Types.SqlHierarchyIdAn ancestor of the SqlHierarchyId node specifying the endpoint of the path segment that is to be moved.
newRoot
Type: Microsoft.SqlServer.Types.SqlHierarchyIdThe SqlHierarchyId node that represents the new ancestor of this.
Return Value
Type: Microsoft.SqlServer.Types.SqlHierarchyId
A SqlHierarchyId node representing the new hierarchical location of this. Will return null if oldRoot, newRoot, or thisare null.
Remarks
Returns a node whose path from the root is the path to newRoot, followed by the path from oldRoot to this.
The SqlHierarchyId data type represents but does not enforce the hierarchical structure. Users must ensure that the SqlHierarchyId node is appropriately structured for the new location.
See Also
SqlHierarchyId Structure
Microsoft.SqlServer.Types Namespace
Return to top