CopyManager manager = null;
try {
con = this.getConnection();
con.setAutoCommit(false);
if(con instanceof com.jolbox.bonecp.ConnectionHandle){
ConnectionHandle handle = (ConnectionHandle)con;
manager = new CopyManager(
(BaseConnection) handle.getInternalConnection());
} else {
manager = new CopyManager((BaseConnection) con);
}
manager.copyIn(query, reader);