Пример #1
0
 private void TranformList(NEORSTNode Parent, List <NEORSTNode> state)
 {
     state.Add(Parent);
     foreach (var relation in Parent.Relations)
     {
         TranformList(relation.Child, state);
     }
 }
Пример #2
0
 public void CreateRelation(NEO.NEORSTRelation Relation, NEO.NEORSTNode Parent, NEO.NEORSTNode Child, IGraphClient client)
 {
     client.Cypher
     .Match("(a:RSTNode)", "(b:RSTNode)")
     .Where((RSTNode a) => a.name == Parent.name)
     .AndWhere((RSTNode b) => b.name == Child.name)
     .CreateUnique(string.Format("(a)-[r:RSTRelation {{ kind: '{0}'}}]->(b)", Relation.relation))
     .ExecuteWithoutResults();
 }
Пример #3
0
 private void InternalSave(NEO.NEORSTNode Node, IGraphClient Client)
 {
     this.CreateNode(Node, Client);
     foreach (var rel in Node.Relations)
     {
         InternalSave(rel.Child, Client);
         this.CreateRelation(rel, Node, rel.Child, Client);
     }
 }
Пример #4
0
 public void CreateNode(NEO.NEORSTNode Node, IGraphClient client)
 {
     client.Cypher.Merge("(d:RSTNode { name : {name}})").OnCreate()
     .Set("d = {newObject}")
     .WithParams(
         new
     {
         name      = Node.name,
         newObject = Node
     }
         ).ExecuteWithoutResults();
 }