我正在尝试使用c#的Neo4jclient将关系批量插入neo4j数据库。我按用户找到了此代码
dcinzona
。我正在查看最新的源代码,但在任何地方都找不到此类Neo4jDataResository。这是该用户创建的自定义类还是我缺少了什么?
string merge1 = string.Format("c:{0} {{{1}:row.{2}}}", IDFieldLeft.Replace("Id", ""), IDFieldLeft, IDFieldLeft);
string merge2 = string.Format("a:{0} {{{1}:row.{2}}}", IDFieldRight.Replace("Id", ""), IDFieldRight, IDFieldRight);
string merge3 = string.Format("(c)-[r:{0} {{row}}]->(a)", entityName);
foreach (var list in Neo4jDataRepository.Batch(relationshipMatrix, 1000))
{
var query = client
.Cypher
.WithParam("coll", list.ToList())
.ForEach("(row in {coll})")//manually create json array of list objects
.Merge(merge1)
.Merge(merge2)
.Merge(merge3);
query.ExecuteWithoutResults();
}