Retrieve Relationships with Cypher Queries

Description

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

Usage

1
getRels(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 list of relationship objects.

See Also

getSingleRel

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Not run: 
graph = startGraph("http://localhost:7474/db/data/")
clear(graph)

alice = createNode(graph, "Person", name = "Alice")
bob = createNode(graph, "Person", name = "Bob")
charles = createNode(graph, "Person", name = "Charles")
david = createNode(graph, "Person", name = "David")

createRel(alice, "KNOWS", bob)
createRel(alice, "KNOWS", charles)
createRel(charles, "KNOWS", david)

createRel(bob, "WORKS_WITH", david)
createRel(alice, "WORKS_WITH", david)

getRels(graph, "MATCH (:Person)-[k:KNOWS]->(:Person) RETURN k")
getRels(graph, "MATCH (:Person {name:{name}})-[r]->(:Person) RETURN r", name = "Alice")

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.