Description Usage Arguments Value See Also Examples
View source: R/getSingleNode.R
Deprecated. Use cypherToList
. Retrieve a single node from the graph with a Cypher query.
1 | getSingleNode(graph, query, ...)
|
graph |
A graph object. |
query |
A character string. |
... |
Parameters to pass to the query in the form key = value, if applicable. |
A node object.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ## 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.