architxt.database.export.cypher#

Functions

delete_id_column(session)

Delete the _architxt_oid property from all nodes in the graph.

export_cypher(forest, session)

Export the graph instance as a dictionary using Neo4j.

export_group(group, session)

Export the group to the graph.

export_relation(tree, session)

Export the relation to the graph.

export_relation_edge_with_data(edge_data, ...)

Export the relation edge with data to the graph.

export_tree(tree, session, edge_data)

Export the tree to the graph.

get_properties(node)

Get the properties of a node.

architxt.database.export.cypher.delete_id_column(session)[source]#

Delete the _architxt_oid property from all nodes in the graph.

Parameters:

session (Session) – Neo4j session.

Return type:

None

architxt.database.export.cypher.export_cypher(forest, session)[source]#

Export the graph instance as a dictionary using Neo4j.

Parameters:
  • session (Session) – Neo4j session.

  • forest (Collection[Tree]) – The forest to export.

Return type:

None

Returns:

A generator that yields dictionaries representing the graph.

architxt.database.export.cypher.export_group(group, session)[source]#

Export the group to the graph.

Parameters:
  • group (Tree) – Group to export.

  • session (Session) – Neo4j session.

Return type:

None

architxt.database.export.cypher.export_relation(tree, session)[source]#

Export the relation to the graph.

Parameters:
  • tree (Tree) – Relation to export.

  • session (Session) – Neo4j session.

Return type:

None

architxt.database.export.cypher.export_relation_edge_with_data(edge_data, session)[source]#

Export the relation edge with data to the graph.

Parameters:
  • edge_data (dict[Tree, set[Tree]]) – Dictionary of edges with data.

  • session (Session) – Neo4j session.

Return type:

None

architxt.database.export.cypher.export_tree(tree, session, edge_data)[source]#

Export the tree to the graph.

Parameters:
  • tree (Tree) – Tree to export.

  • session (Session) – Neo4j session.

  • edge_data (set[str])

Return type:

None

architxt.database.export.cypher.get_properties(node)[source]#

Get the properties of a node.

Parameters:

node (Tree) – Node to get properties from.

Return type:

dict[str, str]

Returns:

Dictionary of properties.