public ICypherQuery Execute(ICypherQuery query) { query = query .Match(StatementFactory.Match(_node, StatementFactory.IdParameter(_node))) .WithParam(StatementFactory.IdParameter(_node), _node.Id) .DetachDelete($"{StatementFactory.ExistingNode(_node)}"); return(query); }
public ICypherQuery Execute(ICypherQuery query) { query .With(StatementFactory.With(_source)) .Match(StatementFactory.Match(_destination, StatementFactory.IdParameter(_destination))) .CreateUnique(StatementFactory.Relationship(_source, _destination, _relationship)) .WithParam(StatementFactory.IdParameter(_destination), _destination.Id); return(query); }
public ICypherQuery Execute(ICypherQuery query) { query = query .With(StatementFactory.With(_source)) .Match(StatementFactory.Match(_destination, StatementFactory.IdParameter(_destination))) .Match(StatementFactory.Relationship(_source, _destination, _relationship, _relationshipName)) .WithParam(StatementFactory.IdParameter(_destination), _destination.Id) .Delete(GetNodesToDelete()); return(query); }
public void MatchShouldGenerateValidSyntax() { var factory = new AttributeMetadataFactory(null); var person = new Person { Id = "1" }; var node = new Node(factory.Create(person), person); var statement = StatementFactory.Match(node, StatementFactory.Parameter(node)); var query = new CypherQuery <Person>(); var response = query.Match(statement); Assert.Equal("MATCH (Person_1:Person { Id:{Person_1}})", response.Statement); }