@Test public void foldLeft() { FoldLeftSelectOp<Integer> fold = new FoldLeftSelectOp<>("SELECT * FROM MySqlTest_IDS", NO_BINDER, (x, rs) -> x + rs.getInt(1), 0); Integer result = DB.submit(fold); assertThat(result, is(0)); DB.submit(insertKeysOp(asList("a", "b", "c", "d"))); Integer expected = DB.submit(new SelectOp.FjList<>("SELECT ID FROM MySqlTest_IDS", NO_BINDER, x -> x.getInt(1))) .foldLeft((x, y) -> x + y, 0); result = DB.submit(fold); assertThat(result, is(expected)); }
new FoldLeftSelectOp<>( "SELECT * FROM EMPLOYEES", NO_BINDER,