Hello everyone, I am having some problems with the Cypher procedures.
I want to return the graph that I get from executing a cypher query but I can't wrap my head around what type I need to return from my procedure method and what GraphDatabaseService method I need to execute to get that object. I am pretty sure it is a stream with a custom type containing the data I want to return but what is that precisely?
As my first try I am trying to return the base Hello World query that is included in the Basic Query scripts.
Here is an extract of my procedure method:
@Procedure("ktk.mytest")
@Description("A test procedure that therurns HELLO WORLD!")
public Stream<MyTestResult> test(){
String query;
query = "CREATE (database:Database {name:"Neo4j"})-[r:SAYS]->(message:Message {name:"Hello World!"}) RETURN database, message, r";Stream<MyTestResult> rStream = db.execute(query).stream().map(MyTestResult::new);
return rStream;
}
Thank you very much and sorry for the very simple question, I am quite a noob at this.
Thanks,
Gustavo.