0

I tried get all data from my neo4j database via neo4j driver (https://github.com/neo4j/neo4j-dotnet-driver) and I have problem, because IResultCursor result have nodes only without edges. My code:

var records = new List<IRecord>();
IResultCursor result = await session.RunAsync("MATCH (n) RETURN n");
while(await result.FetchAsync())
{
      records.Add(result.Current);
}

After all list 'records' have nodes only. In the end I would like to ask you, how can I get query execution time? Thanks!

BeFine9
  • 15
  • 5

1 Answers1

0

You need to write a query that returns nodes and relationships

e.g. MATCH (n)-[r]->(m) RETURN n,r,m

for the execution time, you can either access the ResultSummary or just measure the time in your program.

Michael Hunger
  • 41,339
  • 3
  • 57
  • 80