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

PyOrient gives results that differ from OrientDB studio #280

Open
rohit-mohan opened this issue Feb 25, 2019 · 1 comment
Open

PyOrient gives results that differ from OrientDB studio #280

rohit-mohan opened this issue Feb 25, 2019 · 1 comment

Comments

@rohit-mohan
Copy link

capture

I have a graph as shown in the image above.
When I run the query :

      traverse outE('has_component').inV() 
      from 
        (select expand(rid) from index:part.part_id where key = 'A') 
      maxdepth 2 strategy breadth_first

in OrientDB Studio I get all the vertices. In fact that is how I generated the graph visualization.

But when I run the same using client.query() function as follows,

cmd = """
      traverse outE('has_component').inV() 
      from 
        (select expand(rid) from index:part.part_id where key = 'A') 
      maxdepth 2 strategy breadth_first
"""

r = client.query(cmd, -1)

I get only the first record (i.e 'A'). Why is this happening? How can get the same output through pyorient as I do through OrientDB Studio?

OrientDB version : 3.0.15
pyorient version : 1.5.5

@nikulukani
Copy link
Contributor

try traverse outE('has_component'), inV() from ... or simply traverse out('has_component') from ... if you are only interested in the Nodes and not the Relationships.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants