Skip to content

Commit

Permalink
added failing test.
Browse files Browse the repository at this point in the history
  • Loading branch information
schauder committed Nov 8, 2023
1 parent c653a21 commit af1027d
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,19 @@ void rendersAliasedExpression() {
.isEqualTo("SELECT table.name AS alias FROM table");
}

@Test // GH-1653
void notOfNested(){

Table table = SQL.table("atable");

Select select = StatementBuilder.select(table.asterisk()).from(table). where(
Conditions.nest(table.column("id").isEqualTo(Expressions.just("1"))
.and(table.column("id").isEqualTo(Expressions.just("2")))).not()).build();
String sql = SqlRenderer.toString(select);

assertThat(sql).isEqualTo("SELECT atable.* FROM atable WHERE NOT (atable.id = 1 AND atable.id = 2)");
}

/**
* Tests the rendering of analytic functions.
*/
Expand Down

0 comments on commit af1027d

Please sign in to comment.