docs: public List<Post> selectPosts(final EnumSet<Post.Type> types,
                                   final Post.Status status,
                                   final Post.Sort sort,
                                   final Paging paging,
                                   final boolean withResolve) throws SQLException {
  
        if(paging.limit < 1 || paging.start < 0) {
           return ImmutableList.of();
        }
  
        List<Post.Builder> builders = Lists.newArrayListWithExpectedSize(paging.limit < 1024 ? paging.limit : 1024);
  
        StringBuilder sql = new StringBuilder(selectPostSQL);
        sql.append(postsTableName);
        sql.append(" WHERE post_status=?");
        appendPostTypes(types, sql);
        appendPagingSortSQL(sql, sort, paging);
  
        Connection conn = null;
        PreparedStatement stmt = null;
        ResultSet rs = null;
        Timer.Context ctx = metrics.selectPostsTimer.time();
        try {
           conn = connectionSupplier.getConnection();
           stmt = conn.prepareStatement(sql.toString());
           stmt.setString(1, status.toString().toLowerCase());
           if(paging.interval != null) {
              stmt.setTimestamp(2, new Timestamp(paging.interval.getStartMillis()));
              stmt.setTimestamp(3, new Timestamp(paging.interval.getEndMillis()));
              stmt.setInt(4, paging.start);
              stmt.setInt(5, paging.limit);
           } else {
              stmt.setInt(2, paging.start);
              stmt.setInt(3, paging.limit);
           }
           rs = stmt.executeQuery();
           while(rs.next()) {
              builders.add(postFromResultSet(rs));
           }
        } finally {
           ctx.stop();
           SQLUtil.closeQuietly(conn, stmt, rs);
        }
  
        List<Post> posts = Lists.newArrayListWithExpectedSize(builders.size());
        for(Post.Builder builder : builders) {
           if(withResolve) {
              posts.add(resolve(builder).build());
           } else {
              posts.add(builder.build());
           }
        }
  
        return posts;
     }