RNeo4j (version 1.6.4)

delete: Delete Nodes and Relationships

Description

Delete node or relationship object(s) from the graph.

Usage

delete(...)

Arguments

...
A list of entities to delete.

Details

Nodes with incoming or outgoing relationships cannot be deleted. All incoming and outgoing relationships need to be deleted before the node can be deleted.

Examples

Run this code
## Not run: 
# graph = startGraph("http://localhost:7474/db/data/")
# clear(graph)
# 
# alice = createNode(graph, name = "Alice")
# bob = createNode(graph, name = "Bob")
# 
# rel = createRel(alice, "WORKS_WITH", bob)
# 
# delete(rel)
# delete(alice, bob)
# ## End(Not run)

Run the code above in your browser using DataCamp Workspace