27.5.3 Transposing Graphs
Note:
Starting from Graph Server and Client Release 25.1, transposed graphs are deprecated.You can create a transposed version of the graph.
PgxGraph transpose(Collection<VertexProperty<?, ?>> vertexProps,
Collection<EdgeProperty<?>> edgeProps,
Map<String, String> edgeLabelMapping,
Mode mode, String newGraphName)
transpose(self, vertex_properties=True, edge_properties=True, edge_label_mapping=None, in_place=False,
name=None)
The edgeLabelMapping
argument can be used to rename edge
labels. If any key in the given map does not exist as an edge label, it will be ignored.
edgeLabelMapping
argument can also be an empty Map or
null.
null
: if argument isnull
, edge labels from source graph will be removed on transposed graph. (default behavior when using convenience methods).empty Map
: if argument is an empty Map, edge labels from source graph will be neither removed or renamed. Instead, it will be kept as it is in source graph.
See Simplifying and Copying Graphs for the meaning of the other parameters.
Additionally, the graph server (PGX) provides the following convenience
methods from the PgxGraph
class for the common operation of copying all
vertex and edge properties into the transposed graph instance:
Parent topic: Graph Mutation and Subgraphs