Easier Way to Get Full Quads in Results
If I want to get all information from a query, I have to write something like this:
graph.Vertex("</en/from_the_terrace>","").Tag("1").Out(["","\u003c/film/film/directed_by\u003e"], "1out2").Tag("2").Out("", "2out3").Tag("3").All();
It would be nice if there were some way to get all the quads related to the query, so that I could make a query like this:
graph.Vertex("</en/from_the_terrace>",).Out("\u003c//film/film/directed_by\u003e").All().Quads();
We are discussing one of the possible solutions for this. Will be implemented a bit later one way or another.
Related topic
Do we have any insight onto a timeline for a feature like this? We are in need of this as well. We actually talked with Barak in person about this.
It's relatively easy to make it work like this:
p = g.V("node").In("<rdf:subject>") // now we have links!
// save each quad "direction"
p = p.Save("<rdf:subject>","s").Save("<rdf:predicate>","p").Save("<rdf:object>","o")
arr = p.TagArray()
But all code path should be carefully examined, because it expects only nodes to be returned, not links. Thus it may crash occasionally if we miss something. This is the only time consuming part that I can think of. So, If this solution look good for you (and @barakmich), then I can implement it in a few days.
If you could get it to return both nodes and links, that would be great. Would there be a way of getting labels as well?
Sure. Labels are the same.
Any chance this will be in the 0.6 release?
We already tagged v0.6, so no. I think it will be in a next minor release.
Any Updates on when we might see this?
@carnalim Please test #494. It's missing some reversals and Has support, but it works for In/Out/Save.
https://github.com/cayleygraph/cayley/issues/820 is a step forwards.