@Test void fetchFirst() { SelectStatement<Integer> sut = new SelectStatement<>(createScope(), TypeToken.of(Integer.class), from, rowMapper, projection); when(projection.sql(any())).thenReturn("*"); when(from.sql(any())).thenReturn(" from bob"); sut.fetchFirst(4L); assertThat(sut.sql(), is("select * from bob fetch first 4 rows only")); }
void fetchFirst(long i) { fetchFirst = Optional.of(i); }
SelectStatement { void fetchFirst(long i) { fetchFirst = Optional.of(i); } }
SelectStatement { void fetchFirst(long i) { fetchFirst = Optional.of(i); } SelectStatement(Scope scope, TypeToken<RT> rowType, From from, RowMapper<RT> rowMapper, Projection projection); }
SelectStatement { void fetchFirst(long i) { fetchFirst = Optional.of(i); } SelectStatement(Scope scope, TypeToken<RT> rowType, From from, RowMapper<RT> rowMapper, Projection projection); TypeToken<RT> rowType(); Stream<CommonTableExpression<?>> commonTableExpressions(); }
SelectStatement { void fetchFirst(long i) { fetchFirst = Optional.of(i); } SelectStatement(Scope scope, TypeToken<RT> rowType, From from, RowMapper<RT> rowMapper, Projection projection); TypeToken<RT> rowType(); Stream<CommonTableExpression<?>> commonTableExpressions();  }