Skip to content

Commit

Permalink
build: Add more tests for GH-547.
Browse files Browse the repository at this point in the history
nocl
  • Loading branch information
michael-simons committed Jan 9, 2023
1 parent f0d1019 commit 0345a7e
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1430,4 +1430,14 @@ void unwindWithoutWith() {
.build();
assertThat(renderer.render(statement)).isEqualTo("UNWIND $ids AS id MATCH (n:`Person`) WHERE elementId(n) = id RETURN n");
}

@Test // GH-547
void mixedBagOfWith() {

var cypher = Cypher.match(person)
.with(person, Expressions.count(person.relationshipTo(Cypher.anyNode(), "ACTED_IN")).as("actedInDegree"))
.returning(Cypher.asterisk())
.build().getCypher();
assertThat(cypher).isEqualTo("MATCH (person:`Person`) WITH person, COUNT { (person)-[:`ACTED_IN`]->() } AS actedInDegree RETURN *");
}
}

0 comments on commit 0345a7e

Please sign in to comment.