Expand description
Graph-native entity types: Node, Edge, and Path.
When a GQL query projects a node, edge, or path variable
(e.g. MATCH (n) RETURN n), the driver surfaces the value as an
object-shaped Value with well-known keys. The helpers in this
module (as_node, as_edge, as_path) decode those objects
into the typed structs below.
These mirror the Go reference client’s Node/Edge/Path types and
AsNode/AsEdge/AsPath conversions.
§Example
let (page, _) = conn.query("MATCH (n:Person) RETURN n LIMIT 1").await?;
if let Some(v) = page.rows[0].get("n") {
if let Some(node) = graph::as_node(v) {
println!("node {} labels {:?}", node.id, node.labels);
}
}Structs§
- Edge
- The typed representation of a Geode graph edge (relationship) value.
- Node
- The typed representation of a Geode graph node value.
- Path
- The typed representation of a Geode graph path value: the ordered sequence of nodes and edges along a traversal.