code: @SuppressWarnings("unchecked")
      public static long exportCSV(final File out, final PreparedStatement stmt) throws UncheckedSQLException, UncheckedIOException {
          return exportCSV(out, stmt, 0, Long.MAX_VALUE, true, true);
      }
docs: Exports the data from database to CVS. Title will be added at the first line and columns will be quoted.
  
  @param out
  @param stmt
  @return