The Practitioner's Guide to Graph Data by Denise Gosnell

The Practitioner's Guide to Graph Data by Denise Gosnell

Author:Denise Gosnell
Language: eng
Format: epub
Publisher: O'Reilly Media
Published: 2020-03-19T00:00:00+00:00


Resolution: The where().by() pattern

If has("timestep", loops()) doesn’t work, why does the where().by() pattern work?

Let’s dig into why.

In Example 7-5, we used the following Gremlin pattern to create an edge filter:

where(eq("sendEdge")). by(loops()). by("timestep")

The basic form of where() in Gremlin is where(a, pred(b)). Our usage applies the shorthand of where(pred(b)), in which the incoming traverser is implicitly assigned to a.

Since the incoming traverser was labeled sendEdge, you actually have:



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.