I am trying to batch insert relationships into neo4j database using the Neo4jclient for c#. I found this code by user dcinzona. I am looking through the latest source code and can't find this class Neo4jDataRespository anywhere. Is this a custom class created by this user or am I missing something?
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();
}
This is a custom class created by that user, it's not part of Neo4jClient
.
I'm not sure what they've done, and I've not seen it referenced anywhere else but by them I'm afraid :/