Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Easier Way to Get Full Quads in Results #469

Open
ericsliu opened this issue Aug 31, 2016 · 11 comments
Open

Easier Way to Get Full Quads in Results #469

ericsliu opened this issue Aug 31, 2016 · 11 comments
Assignees
Milestone

Comments

@ericsliu
Copy link

ericsliu commented Aug 31, 2016

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();

@dennwc dennwc added this to the Later. milestone Aug 31, 2016
@dennwc
Copy link
Member

dennwc commented Aug 31, 2016

We are discussing one of the possible solutions for this. Will be implemented a bit later one way or another.

@dennwc
Copy link
Member

dennwc commented Sep 3, 2016

Related topic

@carnalim
Copy link

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.

@dennwc
Copy link
Member

dennwc commented Sep 16, 2016

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.

@dennwc dennwc self-assigned this Sep 16, 2016
@ericsliu
Copy link
Author

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?

@dennwc
Copy link
Member

dennwc commented Sep 16, 2016

Sure. Labels are the same.

@carnalim
Copy link

carnalim commented Oct 4, 2016

Any chance this will be in the 0.6 release?

@dennwc
Copy link
Member

dennwc commented Oct 4, 2016

We already tagged v0.6, so no. I think it will be in a next minor release.

@dennwc dennwc modified the milestones: v0.6.1, Later. Oct 7, 2016
@carnalim
Copy link

Any Updates on when we might see this?

@dennwc
Copy link
Member

dennwc commented Nov 18, 2016

@carnalim Please test #494. It's missing some reversals and Has support, but it works for In/Out/Save.

@dennwc dennwc modified the milestones: v0.7, v0.6.1 Jan 11, 2017
@dennwc dennwc modified the milestones: v0.7, v0.8 Nov 26, 2017
@dennwc dennwc modified the milestones: v0.8, v0.7.2 Jan 30, 2018
@dennwc dennwc modified the milestones: v0.7.2, v0.8 Mar 3, 2018
@iddan
Copy link
Collaborator

iddan commented Sep 22, 2019

#820 is a step forwards.

@iddan iddan modified the milestones: v0.8, Later. Oct 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants