Examples of copyIn()


Examples of org.postgresql.copy.CopyManager.copyIn()

        sql.append(conf.get("postgresql.null.string"));
        sql.append("'");
      }
      sql.append(")");
      LOG.debug("Starting export with copy: " + sql);
      copyin = cm.copyIn(sql.toString());
    } catch (SQLException ex) {
      LoggingUtils.logAll(LOG, "Unable to get CopyIn", ex);
      close();
      throw new IOException(ex);
    }
View Full Code Here

Examples of org.postgresql.copy.CopyManager.copyIn()

            (BaseConnection) handle.getInternalConnection());
      } else {
        manager = new CopyManager((BaseConnection) con);
      }
     
      manager.copyIn(query, reader);
      con.commit();
    } catch (Exception e) {
      if(log.isErrorEnabled()){
        log.error(query, e);
      }
View Full Code Here

Examples of org.postgresql.copy.CopyManager.copyIn()

              { "clock_interval", "Clock_Interval" },
              { "ssc", "Standard_Settlement_Configuration" },
              { "measurement_requirement",
                  "Measurement_Requirement" } };
          for (String[] impArray : mddArray) {
            cm.copyIn(
                "COPY " + impArray[0]
                    + " FROM STDIN CSV HEADER",
                context.getResource(
                    "/WEB-INF/mdd/" + impArray[1] + ".csv")
                    .openStream());
View Full Code Here

Examples of org.postgresql.copy.CopyManager.copyIn()

                entityManager,
                connection -> {
                    try {
                        CopyManager copyManager = new CopyManager((BaseConnection) connectionAccessor
                                .getRawConnection(connection));
                        copyManager.copyIn("copy " + getEntityName(entityList) + "(" + fieldNames + ") from stdin",
                                reader);
                    } catch (Exception e) {
                        logger.trace("Command passed: copy {} ( {} ) from stdin {}", getEntityName(entityList),
                                fieldNames, builder);
                        throw Throwables.propagate(e);
View Full Code Here

Examples of org.postgresql.copy.CopyManager.copyIn()

                connection -> {
                    try {
                        CopyManager copyManager = new CopyManager((BaseConnection) connectionAccessor
                                .getRawConnection(connection));
                        long t1 = System.currentTimeMillis();
                        copyManager.copyIn("copy " + getEntityName(entityList) + "(" + fieldNames + ") from stdin",
                                reader);
                        long elapsedTime = System.currentTimeMillis() - t1;
                        logger.debug("Wrote {} inserts in {} seconds", entityList.size(),
                                Math.round(elapsedTime / 10.0) / 100.0);
                    } catch (Exception e) {
View Full Code Here

Examples of org.postgresql.copy.CopyManager.copyIn()

                connection -> {
                    try {
                        CopyManager copyManager = new CopyManager((BaseConnection) connectionAccessor
                                .getRawConnection(connection));
                        long t1 = System.currentTimeMillis();
                        copyManager.copyIn("copy " + getEntityName(entityList) + "(" + fieldNames + ") from stdin",
                                reader);
                        long elapsedTime = System.currentTimeMillis() - t1;
                        logger.debug("Wrote {} inserts in {} seconds", entityList.size(),
                                Math.round(elapsedTime / 10.0) / 100.0);
                    } catch (Exception e) {
View Full Code Here

Examples of org.postgresql.copy.CopyManager.copyIn()

                connection -> {
                    try {
                        CopyManager copyManager = new CopyManager((BaseConnection) connectionAccessor
                                .getRawConnection(connection));
                        long t1 = System.currentTimeMillis();
                        copyManager.copyIn("copy " + getEntityName(entityList) + "(" + fieldNames + ") from stdin",
                                reader);
                        long elapsedTime = System.currentTimeMillis() - t1;
                        logger.debug("Wrote {} inserts in {} seconds", entityList.size(),
                                Math.round(elapsedTime / 10.0) / 100.0);
                    } catch (Exception e) {
View Full Code Here

Examples of org.postgresql.copy.CopyManager.copyIn()

                connection -> {
                    try {
                        CopyManager copyManager = new CopyManager((BaseConnection) connectionAccessor
                                .getRawConnection(connection));
                        long t1 = System.currentTimeMillis();
                        copyManager.copyIn("copy " + getEntityName(entityList) + "(" + fieldNames + ") from stdin",
                                reader);
                        long elapsedTime = System.currentTimeMillis() - t1;
                        logger.debug("Wrote {} inserts in {} seconds", entityList.size(),
                                Math.round(elapsedTime / 10.0) / 100.0);
                    } catch (Exception e) {
View Full Code Here

Examples of org.postgresql.copy.CopyManager.copyIn()

                connection -> {
                    try {
                        CopyManager copyManager = new CopyManager((BaseConnection) connectionAccessor
                                .getRawConnection(connection));
                        if (entityList.size() != 0) {
                            copyManager.copyIn("copy " + getEntityName(entityList) + "(" + getFieldNames(entityList)
                                    + ") from stdin", new CopyListReader<E>(entityList));
                        }
                    } catch (Exception e) {
                        throw Throwables.propagate(e);
                    }
View Full Code Here

Examples of org.postgresql.copy.CopyManager.copyIn()

                connection -> {
                    try {
                        CopyManager copyManager = new CopyManager((BaseConnection) connectionAccessor
                                .getRawConnection(connection));
                        long t1 = System.currentTimeMillis();
                        copyManager.copyIn("copy " + getEntityName(entityList) + "(" + fieldNames + ") from stdin",
                                reader);
                        long elapsedTime = System.currentTimeMillis() - t1;
                        logger.debug("Wrote {} inserts in {} seconds", entityList.size(),
                                Math.round(elapsedTime / 10.0) / 100.0);
                    } catch (Exception e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.