hydra.pg.graphson.construct module
Functions for constructing GraphSON vertices from property graph vertices.
- hydra.pg.graphson.construct.adjacent_edge_to_graphson(encode_value: Callable[[T0], object], edge: AdjacentEdge[T0]) object
Convert a property graph adjacent edge to a GraphSON adjacent edge.
- hydra.pg.graphson.construct.aggregate_map(pairs: Sequence[tuple[T0, T1]]) Mapping[T0, Sequence[T1]]
Aggregate a list of key-value pairs into a map where each key maps to a list of values.
- hydra.pg.graphson.construct.edge_property_to_graphson(encode_value: Callable[[T0], object], prop: tuple[PropertyKey, T0]) object
Convert a property graph edge property to a GraphSON property.
- hydra.pg.graphson.construct.graphson_vertex_to_json_coder() Coder[Vertex, Value, Error]
A coder that converts GraphSON vertices to JSON. Decoding is not supported.
- hydra.pg.graphson.construct.pg_vertex_with_adjacent_edges_to_graphson_vertex(encode_value: Callable[[T0], object], vae: VertexWithAdjacentEdges[T0]) object
Convert a property graph vertex with adjacent edges to a GraphSON vertex.
- hydra.pg.graphson.construct.pg_vertex_with_adjacent_edges_to_json(encode_value: Callable[[T0], object], vertex: VertexWithAdjacentEdges[T0]) object
Convert a property graph vertex with adjacent edges to JSON.
- hydra.pg.graphson.construct.vertex_property_to_graphson(encode_value: Callable[[T0], object], prop: tuple[PropertyKey, T0]) object
Convert a property graph vertex property to a GraphSON vertex property.