Suppose that I want all vertices and edges (and paths) to be listed in a single column, ordered by their type, is it a possibility?
The documentation does not say anything about that even though it does mention edge, path, vertex, map in orderability?
What could be a possible query to achieve this?
EDIT:
This is somewhat of an output I am looking for
It clearly displays the orderability between Path, edge, and vertex, however, this only works because they are stored in the form of a property of different vertices.
Is it possible to query for all paths, vertices, edges like this in a single column?
2
Answers
You can take the union of a list of all the vertices and edges. Add an extra column that tells if it is a vertex or an edge. Then it can be ordered using the extra column.
To get the vertices, edge in a single column you can try something like:
This will return a list consisting of start vertex, edge, end vertex that make a relationship
In case you need a path, then the following query would work