redisgraph v0.1.0 RedisGraph.Edge View Source
An Edge component relating two Nodes in a Graph.
Edges must have a source node and destination node, describing a relationship between two entities in a Graph. The nodes must exist in the Graph in order for the edge to be added.
Edges must have a relation which identifies the type of relationship being described between entities
Edges, like Nodes, may also have properties, a map of values which describe attributes of the relationship between the associated Nodes.
Link to this section Summary
Functions
Compare two edges with respect to equality.
Create a new Edge from a map.
Convert an edge's properties to a query-appropriate string.
Convert an edge to a query-appropriate string.
Link to this section Types
Link to this section Functions
Compare two edges with respect to equality.
Comparison logic:
- If the ids differ, returns
false
- If the source nodes differ, returns
false
- If the destination nodes differ, returns
false
- If the relations differ, returns
false
- If the properties differ, returns
false
- Otherwise returns
true
Create a new Edge from a map.
Example
edge = Edge.new(%{
src_node: john,
dest_node: japan,
relation: "visited"
})
Convert an edge's properties to a query-appropriate string.
Convert an edge to a query-appropriate string.