Gremlin What is the difference between transform and sideEffect -


Here the total n00b while talking of Gremlin, but someone will tell me the difference between a "change" and "side effects" ? I read Gremlin docs and both seem "on time", take information, massage the data and generate output.

I thought that when I looked like "conversion" then most "gators", but then why would it be called "change"? And then I saw that he worked under the changes which was much more than the data received.

Any help is appreciated, thanks in advance!

A behavior behaves as a map function, where Gremlin The value of the pipeline is truly transformable for a different value:

  devil> GV Transform {it.name} == & gt; Marco ==> Wads ==> Lop ==> Josh ==> Wave ==> Peter   

Note that in the above example, we will call name on Names for the string value of the property Vertex before the transform step; Vertex . Now see what happens with sideEffect :

  gremlin> GVFF fect {it.name} ==> v [1] ==> v [2] ==> V [3] ==> V [4] ==> V [5] ==> ; V [6]   

passes through Vertex sideEffect unchanged (i.e. it exits sideEffect A vertex , as soon as it was gone). The point of a sideEffect is that you can do something in that phase of the pipeline that is not related to the processing of some "pipeline". In other words, the return value of the sideEffect closing is basically ignored.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -