RNeo4j (version 1.6.4)

getType: Relationship Types

Description

Get the type of a relationship object or all relationship types in the graph.

Usage

getType(object)

Arguments

object
A relationship or graph object.

Value

A character vector.

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")
# charles = createNode(graph, "Person", name = "Charles")
# 
# createRel(bob, "WORKS_WITH", charles)
# rel = createRel(alice, "KNOWS", bob)
# 
# getType(rel)
# 
# getType(graph)
# ## End(Not run)

Run the code above in your browser using DataCamp Workspace