As far as I know there are 3 ways to run cypher query in with embedded java app.
org.neo4j.driver.Session session = GraphDatabase.driver(uri, AuthTokens.basic(user, password)).session().run(query)
src,chatgpt
- known limitations,unable to use along with embedded neo4j app,since it needs user and password,I asssume it needs a neo4j/opencypher compatible server.
new GraphDatabaseFactory().newEmbeddedDatabase(STORE_DIR).execute(query)
src,Neo4j slow cypher query in embedded mode
- known limitations, excute(query); seems to not be in the current new api?https://github.com/neo4j/neo4j/blob/5.6/community/graphdb-api/src/main/java/org/neo4j/graphdb/GraphDatabaseService.java
try (Transaction tx = graphDb.beginTx()) then org.neo4j.graphdb.Result result=tx.execute(query);
src,written by myself based on existing api,https://github.com/neo4j/neo4j/blob/5.6/community/graphdb-api/src/main/java/org/neo4j/graphdb/Transaction.java
- known limitations, practically 99% of the codes needs to be rewritten since org.neo4j.graphdb.Result != org.neo4j.driver.Result and the api seems to be different.
So the main question is
- are there other better simpler ways to run cypher query that I didnt list here?
- I am very new to database.Is my analysis of the limitations is (wrong/correct)?
I believe some SO members might frown with 2 questions*.However I believed that the context is very important and it will clearly show my attempts and what I currently understood as.