0

Neo4j has grown a lot since I last used it (milestone 2.0 to 3.0). I wanted to use cypher from java program with embedded graph database (GraphDatabaseService).

I used to create an ExecutionEngine and go from there for this earlier.

It appears that now the preferred way is to use org.neo4j.driver.* for this purpose.

This bundle does not seem to be there in the libs I get from Neo4j 3.0.7.

Is there anyway I can execute cypher query for embedded graph database using java?

2 Answers 2

2

GraphDatabaseService has execute(...) function to run cyphers. https://neo4j.com/docs/java-reference/current/javadocs/org/neo4j/graphdb/GraphDatabaseService.html#execute-java.lang.String-

There are some examples on Neo4j's tutorial page. http://neo4j.com/docs/java-reference/current/#tutorials-java-embedded

Sign up to request clarification or add additional context in comments.

Comments

1

You can execute Cypher using the Java API for an embedded neo4j DB. Refer to this section of the 3.0 docs for more info on this.

The beginning of that same section of the docs shows how to set up your development environment, including setting up the dependencies.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.