firatgursoy / fluentquery

FluentQuery is a sql query builder by using java 8 functional interfaces and spring's JdbcTemplate.
Apache License 2.0
5 stars 0 forks source link

Add list as basic types methods eg. listAsLong, listAsString, listAsInteger #23

Closed firatgursoy closed 3 years ago

firatgursoy commented 4 years ago

Maybe we can use list method for it

firatgursoy commented 3 years ago

Use like this :

    @Test
    void longListTest() {
        List<Long> map = factory.newQuery()
                .append("select i.id from invoice i")
                .append("where i.updated > :updated", "updated", LocalDateTime.now().minusHours(5))
                .list(RowMappers.newSingleColumnRowMapper(Long.class));
        Assertions.assertFalse(map.isEmpty());
    }