File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -18,14 +18,24 @@ package org.polypheny.prism;
18
18
* The GraphFrame represents the non-relational result of a query in the labeled property graph model.
19
19
* If the query returns a relational result, such as when aggregations are used or specific properties are returned,
20
20
* a relational frame is used. The GraphFrame is used for results where a set of nodes and/or edges is returned.
21
+ * The nodes or edges are wrapped in graph elements to allow them to be mixed as paths are returned as a mixed collection of both.
21
22
* If a result produces multiple frames (used to transmit large results), all results will be of the same type (relational vs. graph).
22
- * If the result contains paths, these are represented as a list of nodes and a list of edges. Thus both lists can be populated at once.
23
23
*/
24
24
message GraphFrame {
25
- // Field used to represent a set of nodes as part of a result. If this field is populated all others must not be set.
26
- repeated ProtoNode nodes = 1 ;
27
- // Field used to represent a set of edges as part of a result. If this field is populated all others must not be set.
28
- repeated ProtoEdge edges = 2 ;
25
+ repeated GraphElement element = 1 ;
26
+ }
27
+
28
+ /*
29
+ * Represents an element in a graph. Each element is either a node or an edge.
30
+ */
31
+ message GraphElement {
32
+ // This field stores the graph element itself which is either a node or an edge.
33
+ oneof element {
34
+ // This field stores the node if the graph element is a node.
35
+ ProtoNode node = 1 ;
36
+ // This field stores the edge if the graph element is an edge.
37
+ ProtoEdge edge = 2 ;
38
+ }
29
39
}
30
40
31
41
You can’t perform that action at this time.
0 commit comments