startGraph: Prepare connection to neo4j database

View source: R/startGraph.R

startGraphR Documentation

Prepare connection to neo4j database

Description

Prepare connection to neo4j database

Usage

startGraph(
  url,
  database = NA,
  username = NA,
  password = NA,
  importPath = NA,
  .opts = list(),
  check = TRUE
)

Arguments

url

the DB url

database

the name of the database. If NA (default) it will use "data" with versions 3.. of Neo4j and "neo4j" with versions 4..

username

the neo4j user name (default: NA; works only if authentication has been disabled in neo4j by setting NEO4J.AUTH=none)

password

the neo4j user password (default: NA; works only if authentication has been disabled in neo4j by setting NEO4J.AUTH=none)

importPath

path to the import directory (default: NA => no import directory). Import only works with local neo4j instance.

.opts

a named list identifying the curl options for the handle (see httr::config() and httr::httr_options() for a complete list of available options; for example: .opts = list(ssl_verifypeer = 0)). Moreover, this parameter can be used to pass additional headers to the graph requests as "extendedHeaders": it is useful, for example, for OAuth access delegation (see details).

check

check the connection before returning it (default: TRUE). Set to false when connection to the "system" database

Details

The "ssl.verifypeer" logical option available in the RCurl package used in former versions of neo2R (<= 2.2.0) is not recognized by httr::config(). However, for backward compatibility, if it used, it is translated into "ssl_verifypeer" integer option recognized by the httr package with a warning message.

Headers in .opts$extendedHeaders are added to, or overwrite, the default Neo4j headers. If there is a .opts$extendedHeaders[["Authorization"]] value, the default Neo4j "Authorization" header (user credentials) is provided automaticaly as "X-Authorization". This mechanism is used for OAuth access delegation.

Value

A connection to the graph DB: a list with the url and necessary headers


neo2R documentation built on May 29, 2024, 7:09 a.m.

Related to startGraph in neo2R...