bootiful-sqltemplate-core/src/main/java/ninja/cero/sqltemplate/core/stream/ResultSetIterator.java
private Optional<T> fetchRow() {
        if (this.row != null) {
            // already fetched
            return Optional.of(this.row);
        }

        this.hasReachedEos = hasReachedEos || ! wrapSqlException(() -> rs.next());
        if (this.hasReachedEos) {
            return Optional.empty();
        }

        this.row = wrapSqlException(() -> mapper.mapRow(rs, 1));
        return Optional.ofNullable(this.row);
    }
private Optional<T> fetchRow() {
        if (this.row != null) {
            // already fetched
            return Optional.of(this.row);
        }

        this.hasReachedEos = hasReachedEos || ! wrapSqlException(() -> rs.next());
        if (this.hasReachedEos) {
            return Optional.empty();
        }

        this.row = wrapSqlException(() -> mapper.mapRow(rs, 1));
        return Optional.ofNullable(this.row);
    }
Fetches a row if not fetched yet.