code: @Override
      public <T> Stream<T> executeSelectAsStream(IRowMapper<T> rowMapper, Connection conn,
              boolean autoCloseConnection, int fetchSize, String sql, Object... bindValues) {
          long timestampStart = System.currentTimeMillis();
          try {
              DatabaseVendor dbVendor = DbcHelper.detectDbVendor(conn);
              if (dbVendor == DatabaseVendor.POSTGRESQL) {
                  /*
                   * PostgreSQL: autoCommit must be off!
                   */
                  if (conn.getAutoCommit()) {
                      conn.setAutoCommit(false);
                  }
              }
              /*
               * Do not close the statement, ResultSetIterator will do it!
               */
              PreparedStatement pstm = conn.prepareStatement(sql, ResultSet.TYPE_FORWARD_ONLY,
                      ResultSet.CONCUR_READ_ONLY);
              pstm.setFetchSize(calcFetchSizeForStream(fetchSize, conn));
              JdbcHelper.bindParams(pstm, bindValues);
              ResultSetIterator<T> rsi = autoCloseConnection
                      ? new ResultSetIterator<>(conn, rowMapper, pstm)
                      : new ResultSetIterator<>(rowMapper, pstm);
              return StreamSupport
                      .stream(Spliterators.spliteratorUnknownSize(rsi, Spliterator.IMMUTABLE), false)
                      .onClose(rsi::close);
          } catch (SQLException e) {
              throw translateSQLException(conn, "executeSelect", sql, e);
          } finally {
              BaseDao.addProfiling(timestampStart, sql, System.currentTimeMillis() - timestampStart);
          }
      }
docs: {@inheritDoc}