code: public static long exportCSV(final File out, final Connection conn, final String querySQL) throws UncheckedSQLException, UncheckedIOException {
          return exportCSV(out, conn, querySQL, 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 conn
  @param querySQL
  @return