简体   繁体   English

neo4j c# 获取所有数据

[英]neo4j c# get all data

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.我尝试通过 neo4j 驱动程序从我的 neo4j 数据库中获取所有数据( https://github.com/neo4j/neo4j-dotnet-driver结果有问题,因为我只有没有边) 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!谢谢!

You need to write a query that returns nodes and relationships您需要编写一个返回节点和关系的查询

eg MATCH (n)-[r]->(m) RETURN n,r,m例如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.对于执行时间,您可以访问 ResultSummary 或仅测量程序中的时间。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM