graflo.db.cypher.delete¶
Cypher statements that remove nodes and relationships by their keys or scope.
A key statement unwinds $data, a list of maps, so one statement serves a
chunk of documents on Neo4j, Memgraph and FalkorDB alike. A scope statement
binds the scope as $scope.
Attributes¶
SCOPE_PARAM = 'scope'
module-attribute
¶
Functions:¶
delete_nodes(run, label, key_docs, match_keys, chunk_size)
¶
Run :func:delete_nodes_query over key_docs, a chunk per statement.
Source code in graflo/db/cypher/delete.py
delete_nodes_query(label, match_keys)
¶
Remove the nodes of label matching a row of $data, with their relationships.
Source code in graflo/db/cypher/delete.py
delete_relationships(run, source_label, target_label, relation, endpoints, source_keys, target_keys, chunk_size)
¶
Run :func:delete_relationships_query over endpoints, a chunk per statement.
Source code in graflo/db/cypher/delete.py
delete_relationships_query(source_label, target_label, relation, source_keys, target_keys)
¶
Remove the relationships of relation between the node pairs of $data.
With no relation, every relationship from the source to the target goes.
Source code in graflo/db/cypher/delete.py
delete_scoped_nodes(run, label, field, value)
¶
Run :func:delete_scoped_nodes_query with value bound.
Source code in graflo/db/cypher/delete.py
delete_scoped_nodes_query(label, field)
¶
Remove the nodes of label whose field is $scope, with their relationships.
Source code in graflo/db/cypher/delete.py
delete_scoped_relationships(run, source_label, target_label, relation, field, value)
¶
Run :func:delete_scoped_relationships_query with value bound.
Source code in graflo/db/cypher/delete.py
delete_scoped_relationships_query(source_label, target_label, relation, field)
¶
Remove the relationships of relation whose field is $scope.
With no relation, every relationship from the source to the target is a candidate.