@Test void orHaving() { SelectStatement<Integer> sut = new SelectStatement<>(createScope(), TypeToken.of(Integer.class), from, rowMapper, projection); when(projection.sql(any())).thenReturn("*"); when(from.sql(any())).thenReturn(" from foo"); when(booleanExpression1.sql(any())).thenReturn("a = b"); when(booleanExpression1.precedence()).thenReturn(Precedence.COMPARISON); when(booleanExpression2.sql(any())).thenReturn("c = d"); when(booleanExpression2.precedence()).thenReturn(Precedence.COMPARISON); sut.setHavingClause(booleanExpression1); sut.orHaving(booleanExpression2); assertThat(sut.sql(), is("select * from foo having a = b or c = d")); }
void orHaving(BooleanExpression e) { havingClause.appendOr(e); }
SelectStatement { void orHaving(BooleanExpression e) { havingClause.appendOr(e); } }
SelectStatement { void orHaving(BooleanExpression e) { havingClause.appendOr(e); } SelectStatement(Scope scope, TypeToken<RT> rowType, From from, RowMapper<RT> rowMapper, Projection projection); }
SelectStatement { void orHaving(BooleanExpression e) { havingClause.appendOr(e); } SelectStatement(Scope scope, TypeToken<RT> rowType, From from, RowMapper<RT> rowMapper, Projection projection); TypeToken<RT> rowType(); Stream<CommonTableExpression<?>> commonTableExpressions(); }
SelectStatement { void orHaving(BooleanExpression e) { havingClause.appendOr(e); } SelectStatement(Scope scope, TypeToken<RT> rowType, From from, RowMapper<RT> rowMapper, Projection projection); TypeToken<RT> rowType(); Stream<CommonTableExpression<?>> commonTableExpressions();  }