You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by Marko Rodriguez <ok...@gmail.com> on 2015/03/20 22:53:13 UTC

[TinkerPop3] Mutating Steps in GraphTraversal

Hello,

With TraversalSource, we wanted to make sure that GraphTraversal was able to do everything that was possible from Graph,Vertex,Edge,etc. We all know that GraphTraversal can do READ operations, but what about WRITE? Daniel Kuppitz and I worked out the following mutation steps:

	addV(): http://tinkerpop.incubator.apache.org/docs/3.0.0-SNAPSHOT/#addvertex-step (available off GraphTraversalSource and GraphTraversal)
	addE(): http://tinkerpop.incubator.apache.org/docs/3.0.0-SNAPSHOT/#addedge-step (two types: direct and path-based)
	property(): http://tinkerpop.incubator.apache.org/docs/3.0.0-SNAPSHOT/#addproperty-step

Enjoy,
Marko.

http://markorodriguez.com


Re: [TinkerPop] [TinkerPop3] Mutating Steps in GraphTraversal

Posted by Stephen Mallette <sp...@gmail.com>.
As it stands right now, as I implement TraversalStrategy classes around
mutatins, I'm good with just drop().  Not feeling the need to have to
create explicit methods.

On Mon, Mar 23, 2015 at 12:13 PM, Marko Rodriguez <ok...@gmail.com>
wrote:

> Stephen,
>
> I just added DropStep (and respective test cases in Java and Groovy). It
> implements MutatingStep.
>
> Note that remove() is a method in Iterator -- dah! and must return void.
> Thus, GraphTraversal.remove() -> GraphTraversal is not allowed. As such, I
> called it drop() like in Faunus. If there is a better name someone can
> think of, I can change it as I'm not super happy with "drop." Perhaps the
> user has to be explicit?
>
>         removeV()
>         removeE()
>         removeProperty()
>
> ……………?
>
> Pushed to master.
>
> HTH,
> Marko.
>
> http://markorodriguez.com
>
> On Mar 23, 2015, at 9:22 AM, Stephen Mallette <sp...@gmail.com>
> wrote:
>
> > This is good stuff and in line with the direction to make "everything a
> > Traversal", thus making Traversal Strategy all the more effective.  To
> > continue with that line of thinking, we still need "remove" as a step.
> > Right now it just behaves as a terminating step so you can't really
> > optimize on it with Traversal Strategy.
> >
> > On Fri, Mar 20, 2015 at 5:53 PM, Marko Rodriguez <ok...@gmail.com>
> > wrote:
> >
> >> Hello,
> >>
> >> With TraversalSource, we wanted to make sure that GraphTraversal was
> able
> >> to do everything that was possible from Graph,Vertex,Edge,etc. We all
> know
> >> that GraphTraversal can do READ operations, but what about WRITE? Daniel
> >> Kuppitz and I worked out the following mutation steps:
> >>
> >> addV():
> >>
> http://tinkerpop.incubator.apache.org/docs/3.0.0-SNAPSHOT/#addvertex-step
> (available
> >> off GraphTraversalSource and GraphTraversal)
> >> addE():
> >> http://tinkerpop.incubator.apache.org/docs/3.0.0-SNAPSHOT/#addedge-step
> (two
> >> types: direct and path-based)
> >> property():
> >>
> http://tinkerpop.incubator.apache.org/docs/3.0.0-SNAPSHOT/#addproperty-step
> >>
> >> Enjoy,
> >> Marko.
> >>
> >> http://markorodriguez.com
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> Groups
> >> "Gremlin-users" group.
> >> To unsubscribe from this group and stop receiving emails from it, send
> an
> >> email to gremlin-users+unsubscribe@googlegroups.com.
> >> To view this discussion on the web visit
> >>
> https://groups.google.com/d/msgid/gremlin-users/AC99B863-8CA4-4901-8ADE-17E4B253CFDD%40gmail.com
> >> <
> https://groups.google.com/d/msgid/gremlin-users/AC99B863-8CA4-4901-8ADE-17E4B253CFDD%40gmail.com?utm_medium=email&utm_source=footer
> >
> >> .
> >> For more options, visit https://groups.google.com/d/optout.
> >>
>
>

Re: [TinkerPop] [TinkerPop3] Mutating Steps in GraphTraversal

Posted by Marko Rodriguez <ok...@gmail.com>.
Stephen,

I just added DropStep (and respective test cases in Java and Groovy). It implements MutatingStep.

Note that remove() is a method in Iterator -- dah! and must return void. Thus, GraphTraversal.remove() -> GraphTraversal is not allowed. As such, I called it drop() like in Faunus. If there is a better name someone can think of, I can change it as I'm not super happy with "drop." Perhaps the user has to be explicit?

	removeV()
	removeE()
	removeProperty()

……………?

Pushed to master.

HTH,
Marko.

http://markorodriguez.com

On Mar 23, 2015, at 9:22 AM, Stephen Mallette <sp...@gmail.com> wrote:

> This is good stuff and in line with the direction to make "everything a
> Traversal", thus making Traversal Strategy all the more effective.  To
> continue with that line of thinking, we still need "remove" as a step.
> Right now it just behaves as a terminating step so you can't really
> optimize on it with Traversal Strategy.
> 
> On Fri, Mar 20, 2015 at 5:53 PM, Marko Rodriguez <ok...@gmail.com>
> wrote:
> 
>> Hello,
>> 
>> With TraversalSource, we wanted to make sure that GraphTraversal was able
>> to do everything that was possible from Graph,Vertex,Edge,etc. We all know
>> that GraphTraversal can do READ operations, but what about WRITE? Daniel
>> Kuppitz and I worked out the following mutation steps:
>> 
>> addV():
>> http://tinkerpop.incubator.apache.org/docs/3.0.0-SNAPSHOT/#addvertex-step (available
>> off GraphTraversalSource and GraphTraversal)
>> addE():
>> http://tinkerpop.incubator.apache.org/docs/3.0.0-SNAPSHOT/#addedge-step (two
>> types: direct and path-based)
>> property():
>> http://tinkerpop.incubator.apache.org/docs/3.0.0-SNAPSHOT/#addproperty-step
>> 
>> Enjoy,
>> Marko.
>> 
>> http://markorodriguez.com
>> 
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Gremlin-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to gremlin-users+unsubscribe@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/gremlin-users/AC99B863-8CA4-4901-8ADE-17E4B253CFDD%40gmail.com
>> <https://groups.google.com/d/msgid/gremlin-users/AC99B863-8CA4-4901-8ADE-17E4B253CFDD%40gmail.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>> 


Re: [TinkerPop] [TinkerPop3] Mutating Steps in GraphTraversal

Posted by Stephen Mallette <sp...@gmail.com>.
This is good stuff and in line with the direction to make "everything a
Traversal", thus making Traversal Strategy all the more effective.  To
continue with that line of thinking, we still need "remove" as a step.
Right now it just behaves as a terminating step so you can't really
optimize on it with Traversal Strategy.

On Fri, Mar 20, 2015 at 5:53 PM, Marko Rodriguez <ok...@gmail.com>
wrote:

> Hello,
>
> With TraversalSource, we wanted to make sure that GraphTraversal was able
> to do everything that was possible from Graph,Vertex,Edge,etc. We all know
> that GraphTraversal can do READ operations, but what about WRITE? Daniel
> Kuppitz and I worked out the following mutation steps:
>
> addV():
> http://tinkerpop.incubator.apache.org/docs/3.0.0-SNAPSHOT/#addvertex-step (available
> off GraphTraversalSource and GraphTraversal)
> addE():
> http://tinkerpop.incubator.apache.org/docs/3.0.0-SNAPSHOT/#addedge-step (two
> types: direct and path-based)
> property():
> http://tinkerpop.incubator.apache.org/docs/3.0.0-SNAPSHOT/#addproperty-step
>
> Enjoy,
> Marko.
>
> http://markorodriguez.com
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Gremlin-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to gremlin-users+unsubscribe@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/gremlin-users/AC99B863-8CA4-4901-8ADE-17E4B253CFDD%40gmail.com
> <https://groups.google.com/d/msgid/gremlin-users/AC99B863-8CA4-4901-8ADE-17E4B253CFDD%40gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>