Learn R Programming

RNeo4j (version 1.6.4)

getSingleNode: Retrieve Nodes with Cypher Queries

Description

Deprecated. Use cypherToList. Retrieve a single node from the graph with a Cypher query.

Usage

getSingleNode(graph, query, ...)

Arguments

graph
A graph object.
query
A character string.
...
Parameters to pass to the query in the form key = value, if applicable.

Value

A node object.

See Also

getNodes

Examples

Run this code
## Not run: 
# graph = startGraph("http://localhost:7474/db/data/")
# clear(graph)
# 
# createNode(graph, "Person", name = "Alice", age = 23)
# createNode(graph, "Person", name = "Bob", age = 22)
# createNode(graph, "Person", name = "Charles", age = 25)
# 
# query = "MATCH (p:Person)
# 		 WITH p
# 		 ORDER BY p.age DESC
# 		 RETURN p
# 		 LIMIT 1"
# 
# getSingleNode(graph, query)
# 
# query = "MATCH (p:Person {name:{name}})
#          RETURN p"
# 
# getSingleNode(graph, query, name = "Alice")
# ## End(Not run)

Run the code above in your browser using DataLab