Thanks !
 but maybe it will be slower if one only have one deleted node in a tx ?
Want it fast both for small and huge transactions
is it not possible to find out if a node is deleted or not without
using an internal collection ?

On Sunday, December 19, 2010, Mattias Persson <matt...@neotechnology.com> wrote:
> I just added TransactionData#isDeleted(Node) and
> TransactionData#isDeleted(Relationship) and made the internal collection to
> hold the deleted entities a HashSet for fast lookups.
>
> 2010/12/15 Mattias Persson <matt...@neotechnology.com>
>
>>
>>
>> 2010/12/14 Andreas Ronge <andreas.ro...@gmail.com>
>>
>> Hi
>>>
>>> I'm still struggling with not having a Node.isDeleted() method in the API.
>>>
>>> Here is an example where I need this method:
>>> I'm using the event framework to implemented a simple rule system.
>>> When a node/relationship changes it can trigger an action like setting
>>> a property on another node.
>>> That node must not have been deleted (in the same transaction).
>>> The only way to detect if a node has been deleted is to loop through
>>> the org.neo4j.graphdb.event.TransactionData#deletedNodes()
>>> which feel clumsy. Another solution might be to change the Event API
>>> to make this easier (and faster ?) to do ?
>>>
>>
>> Yes, maybe the data in TransactionData could be a little better, f.ex.
>> exposing a method #nodeIsDeleted(Node) and many more of those?
>>
>>
>>>
>>> I mostly need the isDeleted() method in my unit tests where I want to
>>> delete every node after a test, or test if a node exist or not.
>>>
>>> /Andreas
>>> _______________________________________________
>>> Neo4j mailing list
>>> User@lists.neo4j.org
>>> https://lists.neo4j.org/mailman/listinfo/user
>>>
>>
>>
>>
>> --
>> Mattias Persson, [matt...@neotechnology.com]
>> Hacker, Neo Technology
>> www.neotechnology.com
>>
>
>
>
> --
> Mattias Persson, [matt...@neotechnology.com]
> Hacker, Neo Technology
> www.neotechnology.com
> _______________________________________________
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to