Edges in a property graph
An edge, in a property graph, connects two vertices, and has:
- A set of named properties.
- A source vertex (aka out vertex).
- A destination vertex (aka in vertex).
Note: Pacer edges are directed, but we can always simulate an undirected graph by traversing edges in both (incoming and outgoing) directions.
Let's see the basic edge operations in Pacer ...
Edges are created by calling the
add_edges_to method on a vertex.
You can delete an edge from the graph by calling its
Note: Like all methods that modify the graph, this methods must be called inside a transaction.
We use Blueprints terminology, and say that an edge goes from its out vertex into its in vertex.
out_vertex --edge--> in_vertex.
Get the source vertex.
Get the destination vertex.
Get both vertices.
Note: All the methods above return a route (i.e. A collection) of vertices. In the case of
in_v the route contains a single vertex.
Getting/setting edge properties works the same way as getting/setting vertex properties.
properties methods is used for getting all properties, as a hash object.
 operator is used for getting and setting a specific property.