Learn R Programming

RNeo4j (version 1.6.4)

endNode: Retrieve Nodes from Relationships or Paths

Description

Retrieve the end node from a relationship or path object.

Usage

endNode(object)

Arguments

object
A relationship or path object.

Value

A node object.

See Also

startNode

Examples

Run this code
## Not run: 
# graph = startGraph("http://localhost:7474/db/data/")
# clear(graph)
# 
# alice = createNode(graph, "Person", name = "Alice")
# bob = createNode(graph, "Person", name = "Bob")
# 
# rel = createRel(alice, "WORKS_WITH", bob)
# 
# endNode(rel)
# 
# query = "
# MATCH p = (a:Person)-[:WORKS_WITH]->(b:Person)
# WHERE a.name = 'Alice' AND b.name = 'Bob'
# RETURN p
# "
# 
# path = cypherToList(graph, query)[[1]]$p
# 
# endNode(path)
# ## End(Not run)

Run the code above in your browser using DataLab