cypher: Run a cypher query

Description Usage Arguments Value See Also Examples

View source: R/cypher.R

Description

Run a cypher query

Usage

1
2
3
4
5
6
7
8
cypher(
  graph,
  query,
  parameters = NULL,
  result = c("row", "graph"),
  arraysAsStrings = TRUE,
  eltSep = " || "
)

Arguments

graph

the neo4j connection

query

the cypher query

parameters

parameters for the cypher query.

result

the way to return results. "row" will return a data frame and "graph" will return a list of nodes, a list of relationships and a list of paths (vectors of relationships identifiers).

arraysAsStrings

if result="row" and arraysAsStrings is TRUE (default) array from neo4j are converted to strings and array elements are separated by eltSep.

eltSep

if result="row" and arraysAsStrings is TRUE (default) array from neo4j are converted to strings and array elementes are separated by eltSep.

Value

the "result" of the query (invisible). See the "result" param.

See Also

multicypher(), startGraph(), prepCql(), readCql() and graphRequest()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
# 2 identical queries
result <- cypher(
   graph=graph,
   query='match (n {value:$value}) return n',
   parameters=list(value="100"),
   result="graph"
)
result <- cypher(
   graph=graph,
   query='match (n {value:"100"}) return n',
   result="graph"
)

## End(Not run)

neo2R documentation built on March 31, 2020, 5:18 p.m.

Related to cypher in neo2R...