C# Class TransactionalNodeService.Common.TransactionOperations.DeleteRelationship

Inheritance: ITransactionOperation
Exibir arquivo Open project: chris-tomich/Glyma Class Usage Examples

Public Methods

Method Description
DeleteRelationship ( MapParameters sessionMapParameters ) : System
ExecuteTransaction ( IDbConnectionAbstraction connectionAbstraction, MapTransactionWrapper transactionWrapper, MapResponse &response ) : void

Protected Methods

Method Description
SelectDeleteRelationshipDescriptorsMetadataCommand ( SqlConnection connection, System.Guid relationshipUid ) : SqlCommand

We need to delete all descriptors and metadata associated with this relationship. There are a few key points to know about this operation - 1. We don't need ANY of the connected descriptors because otherwise they would be orphaned and would not link the associated nodes to anything. 2. We don't need ANY of the related metadata. In the scenario where metadata may have both a node and relationship ID it needs to be remembered that the metadata doesn't relate to just the node but relates to the node from the perspective of this relationship. If the relationship doesn't exist then the metadata is meaningless.

Method Details

DeleteRelationship() public method

public DeleteRelationship ( MapParameters sessionMapParameters ) : System
sessionMapParameters MapParameters
return System

ExecuteTransaction() public method

public ExecuteTransaction ( IDbConnectionAbstraction connectionAbstraction, MapTransactionWrapper transactionWrapper, MapResponse &response ) : void
connectionAbstraction IDbConnectionAbstraction
transactionWrapper MapTransactionWrapper
response MapResponse
return void

SelectDeleteRelationshipDescriptorsMetadataCommand() protected method

We need to delete all descriptors and metadata associated with this relationship. There are a few key points to know about this operation - 1. We don't need ANY of the connected descriptors because otherwise they would be orphaned and would not link the associated nodes to anything. 2. We don't need ANY of the related metadata. In the scenario where metadata may have both a node and relationship ID it needs to be remembered that the metadata doesn't relate to just the node but relates to the node from the perspective of this relationship. If the relationship doesn't exist then the metadata is meaningless.
protected SelectDeleteRelationshipDescriptorsMetadataCommand ( SqlConnection connection, System.Guid relationshipUid ) : SqlCommand
connection System.Data.SqlClient.SqlConnection
relationshipUid System.Guid
return System.Data.SqlClient.SqlCommand