Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Delete operation in SDN using cypher
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Abdul Azeez Shaik  
View profile  
 More options Sep 26 2012, 1:27 pm
From: Abdul Azeez Shaik <azeeztechni...@gmail.com>
Date: Wed, 26 Sep 2012 22:56:40 +0530
Local: Wed, Sep 26 2012 1:26 pm
Subject: Re: [Neo4j] Delete operation in SDN using cypher

Hi Lasse,

Can you construct a query for me where only children with outgoing
relationships must be deleted?
I am struggling to write a query for thsi

requirement:
node
its relationships,
its children with outgoing relationship

On Wed, Sep 26, 2012 at 5:03 PM, Lasse Westh-Nielsen <

lasse.westh-niel...@neopersistence.com> wrote:
> Abdul,

> Firstly, did you mean to specify relationships in both directions? Or did
> you mean (notice the arrow to 'p'): "START g =
> node:galleryid(galleryid="0511a491-62ea-41f6-9a6f-b9060e3c525a") MATCH
> g-[r]->p DELETE g, r, p"?

> Anyway that should work if your children have no other relationships. If
> you want to, you can subtrees like this: "START g =
> node:galleryid(galleryid="0511a491-62ea-41f6-9a6f-b9060e3c525a") MATCH
> p=g-[*]->() DELETE p"

> A detail you need to note is the index name, when you use SDN: you can
> either use the automatic/ convention based one, or you can give it a custom
> name.

> Worth writing a test I think? :)

> Lasse

> On Wed, Sep 26, 2012 at 11:33 AM, Abdul Azeez Shaik <
> azeeztechni...@gmail.com> wrote:

>> Dear all,

>> Can i delete a node along with its relationships and children using the
>> following CYPHER query,
>> "START g =
>> node:galleryid(galleryid="0511a491-62ea-41f6-9a6f-b9060e3c525a") MATCH
>> g-[r]-p DELETE g, r, p"

>> Its not working when i tried this in webconsole of neo4j.
>> I am trying to find where i can delete a node with all its children at
>> one go.
>> Or do i need to delete each children and its relationships, and then
>> finally parent node.

>> Kindly let me know your suggestions.

>> Thanks,
>> Abdul

>> --

>  --


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.