Pavel Voronin
Pavel Voronin

Reputation: 13985

How do I drop all nodes which are connected with particular edge?

Consider I have the following path:

A --- dependsOn --> B --- dependsOn --> C --- dependsOn --> D

I want to drop all dependent nodes A,B,C if I start from C.

Upvotes: 1

Views: 148

Answers (1)

Daniel Kuppitz
Daniel Kuppitz

Reputation: 10904

If C should be dropped too:

g.V(C).emit().repeat(__.in('dpendsOn')).drop()

And if you only want to drop the vertices on the left of side of C:

g.V(C).repeat(__.in('dpendsOn')).emit().drop()

Upvotes: 3

Related Questions