Attempts to connect to the specified Neo4J database and run a query to see if it is properly formatted. Returns FALSE if the database is not available or not properly formatted.

neo4j_engine_check(url, username = NA, password = NA, warn = TRUE)

Arguments

url

A character string indicating the URL of the neo4j database.

username

A character string indicating the username for the neo4j database (if needed).

password

A character string indicating the password for the neo4j database (if needed).

warn

A logical indicating whether to print a warning message if with failure information if the database is not available or not properly formatted. Default is TRUE.

Value

TRUE if the database is available and properly formatted, FALSE otherwise.

Examples

print(neo4j_engine_check("https://neo4j.monarchinitiative.org"))
#> Trying to connect to https://neo4j.monarchinitiative.org
#> Connected to https://neo4j.monarchinitiative.org
#> [1] TRUE
print(neo4j_engine_check("https://no-such-db.monarchinitiative.org"))
#> Trying to connect to https://no-such-db.monarchinitiative.org
#> Failed to connect to https://no-such-db.monarchinitiative.org: Couldn't resolve host name [no-such-db.monarchinitiative.org]: Could not resolve host: no-such-db.monarchinitiative.org
#> Warning: Failed to connect to any of the URLs provided.
#> [1] FALSE