public void MatchNamedNodeSkipLimit() { Node movie = Cypher.Node("Movie").Named("m"); StatementBuilder statement = Cypher.Match(movie).Return(movie).Skip(1).Limit(1); statement.Build().MatchSnapshot(); }
public void MatchThreeNodes() { StatementBuilder statement = Cypher .Match(_bikeNode, _userNode, Cypher.Node("U").Named("o")); statement.Build().MatchSnapshot(); }
public void ReturnAsterisk() { StatementBuilder statement = Cypher .Match(_bikeNode, _userNode, Cypher.Node("U").Named("o")) .Return(Cypher.Asterisk); statement.Build().MatchSnapshot(); }
public void NodeWithProperties() { StatementBuilder statement = Cypher .Match(_bikeNode, _userNode, Cypher.Node("U").Named("o")) .Return(_bikeNode, _userNode); statement.Build().MatchSnapshot(); }
public void ChainedRelationshipSingle() { Node tripNode = Cypher.Node("Trip").Named("t"); StatementBuilder statement = Cypher .Match(_userNode .RelationshipTo(_bikeNode, "OWNS") .Named("r1") .RelationshipTo(tripNode, "USED_ON") .Named("r2") ) .Return(_bikeNode, _userNode); statement.Build().MatchSnapshot(); }
public void MatchNamedNodeWithProperties() { Node movie = Cypher.Node("Movie") .Named("m") .WithProperties( "title", Cypher.LiteralOf("The Matrix"), "yearReleased", Cypher.LiteralOf(1999), "released", Cypher.LiteralOf(true), "rating", Cypher.LiteralOf(8.7) ); StatementBuilder statement = Cypher.Match(movie); statement.Build().MatchSnapshot(); }
public void ChainedRelationshipMultiple() { Node tripNode = Cypher.Node("Trip").Named("t"); StatementBuilder statement = Cypher .Match(_userNode .RelationshipTo(_bikeNode, "OWNS") .Named("r1") .RelationshipTo(tripNode, "USED_ON") .Named("r2") .RelationshipFrom(_userNode, "WAS_ON") .Named("x") .RelationshipBetween(Cypher.Node("SOMETHING")) .Named("y") ) .Return(_bikeNode, _userNode); statement.Build().MatchSnapshot(); }
public void PredicateAll() { var compoundCondition = new CompoundCondition(Operator.And); Node bikeNode = Cypher.Node("Bike"); Relationship userBikes = _userNode.RelationshipTo(bikeNode, "OWNS"); compoundCondition.Add(Predicates.Exists(userBikes)); SymbolicName userOwns = Cypher.Name("userOwns"); //var test = Cypher.ListWith(userOwns).In(); StatementBuilder statement = Cypher .Match(new Where(compoundCondition), _userNode) .Return(_userNode); statement.Build().MatchSnapshot(); }