multicypher: Run a multiple cypher queriers

Description Usage Arguments Value See Also Examples

View source: R/cypher.R

Description

Run a multiple cypher queriers

Usage

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

Arguments

graph

the neo4j connection

queries

queries to submit. It can be either a character vector for which each element corresponds to a cypher query. Or it can be a list of lists with the following slots:

  • query (mandatory): A single character corresponding to the cypher query.

  • parameters (optional): A set of parameters specific for this query. If not provided, the parameters parameter of the function is used (see below).

  • result (optional): The specific way to return the results of this query. If not provided, the result parameter of the function is used (see below).

parameters

default parameters for the cypher queries.

result

default 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

a list of "result" of the queries (invisible). See the "result" param.

See Also

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
result <- multicypher(
   graph,
   queries=list(
      q1="match (n) return n.value limit 5",
      q2=list(
         query="match (f {value:$val})-[r]->(t) return f, r, t limit 5",
         result="graph",
         parameters=list(val=100)
      )
   )
)

## End(Not run)

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

Related to multicypher in neo2R...