@Test void setWhereClause() { 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); sut.setWhereClause(booleanExpression1); assertThat(sut.sql(), is("select * from foo where a = b")); }
InWhereExpectingAnd<RT> setWhereClause(BooleanExpression e) { whereClause.start(e); return new InWhereExpectingAnd<>(this); }
SelectStatement { InWhereExpectingAnd<RT> setWhereClause(BooleanExpression e) { whereClause.start(e); return new InWhereExpectingAnd<>(this); } }
SelectStatement { InWhereExpectingAnd<RT> setWhereClause(BooleanExpression e) { whereClause.start(e); return new InWhereExpectingAnd<>(this); } SelectStatement(Scope scope, TypeToken<RT> rowType, From from, RowMapper<RT> rowMapper, Projection projection); }
SelectStatement { InWhereExpectingAnd<RT> setWhereClause(BooleanExpression e) { whereClause.start(e); return new InWhereExpectingAnd<>(this); } SelectStatement(Scope scope, TypeToken<RT> rowType, From from, RowMapper<RT> rowMapper, Projection projection); TypeToken<RT> rowType(); Stream<CommonTableExpression<?>> commonTableExpressions(); }
SelectStatement { InWhereExpectingAnd<RT> setWhereClause(BooleanExpression e) { whereClause.start(e); return new InWhereExpectingAnd<>(this); } SelectStatement(Scope scope, TypeToken<RT> rowType, From from, RowMapper<RT> rowMapper, Projection projection); TypeToken<RT> rowType(); Stream<CommonTableExpression<?>> commonTableExpressions();  }