Examples of copyIn()


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()

       
        conn = DataSourceUtils.getConnection(dataSource);
        try {
          copyManager = new CopyManager(conn.unwrap(BaseConnection.class));
         
          copyManager.copyIn(copyStatement.toString(), bufferedInStream);
        } finally {
          DataSourceUtils.releaseConnection(conn, dataSource);
        }
     
        inStream.close();
View Full Code Here

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

        inStream = new FileInputStream(copyFile);
        bufferedInStream = new BufferedInputStream(inStream, 65536);
       
        copyManager = new CopyManager((BaseConnection) dbCtx.getConnection());
       
        copyManager.copyIn("COPY " + tableName + " FROM STDIN", bufferedInStream);
     
        inStream.close();
      inStream = null;
     
      } catch (IOException e) {
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) {
                        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.