Exemplo n.º 1
0
 public static bool IsDeletedInCurrentTransaction(Relationship relationship)
 {
     if (relationship is RelationshipProxy)
     {
         RelationshipProxy proxy = ( RelationshipProxy )relationship;
         KernelTransaction ktx   = proxy._spi.kernelTransaction();
         using (Statement ignore = ktx.AcquireStatement())
         {
             return(ktx.DataRead().relationshipDeletedInTransaction(proxy._id));
         }
     }
     return(false);
 }
Exemplo n.º 2
0
        private void VerifyIds(EmbeddedProxySPI actions, long relationshipId, long nodeId1, int typeId, long nodeId2)
        {
            RelationshipProxy proxy = new RelationshipProxy(actions, relationshipId, nodeId1, typeId, nodeId2);

            assertEquals(relationshipId, proxy.Id);
            // our mock above is known to return RelationshipTypeToken
            assertEquals(nodeId1, proxy.StartNode.Id);
            assertEquals(nodeId1, proxy.StartNodeId);
            assertEquals(nodeId2, proxy.EndNode.Id);
            assertEquals(nodeId2, proxy.EndNodeId);
            assertEquals(nodeId2, proxy.GetOtherNode(NodeWithId(nodeId1)).Id);
            assertEquals(nodeId2, proxy.GetOtherNodeId(nodeId1));
            assertEquals(nodeId1, proxy.GetOtherNode(NodeWithId(nodeId2)).Id);
            assertEquals(nodeId1, proxy.GetOtherNodeId(nodeId2));
        }