예제 #1
0
        internal void WriteEdge(BaseNode fromNode, BaseNode toNode, BaseEdge edge)
        {
            var query = client.Cypher.MatchQuerry("n", fromNode)
                        .MatchQuerry("m", toNode).
                        Create("(n)-[:" + edge.GetType().Name + " {newEdge}]->(m)").
                        WithParam("newEdge", edge);

            query.ExecuteWithoutResults();
        }
예제 #2
0
        internal void AddTransitionEdge(string fromCommitSha, string fromCommitPath, long fromAstId, BaseNode destNode, BaseEdge edge)
        {
            var query = this.client.Cypher
                        .MatchQuerry("n1", new AstElement()
            {
                AstId = fromAstId, FilePath = fromCommitPath, CommitSha = fromCommitSha
            })
                        .MatchQuerry("n2", destNode)
                        .Create("(n1)-[:" + edge.GetType().Name + " {newEdge}]->(n2)")
                        .WithParam("newEdge", edge);

            query.ExecuteWithoutResults();
        }