RNeo4j (version 1.6.4)

getUniqueNode: Retrieve Nodes by Label and Property

Description

Retrieve a single node from the graph by specifying its label and unique key = value pair.

Usage

getUniqueNode(graph, .label, ...)

Arguments

graph
A graph object.
.label
A character string.
...
A named list. A key = value pair by which the node label is uniquely constrained.

Value

A node object.

See Also

getLabeledNodes

Examples

Run this code
## Not run: 
# graph = startGraph("http://localhost:7474/db/data/")
# clear(graph)
# 
# createNode(graph, "Person", name = "Alice")
# createNode(graph, "Person", name = "Bob")
# 
# addConstraint(graph, "Person", "name")
# 
# getUniqueNode(graph, "Person", name = "Alice")
# ## End(Not run)

Run the code above in your browser using DataLab