/** * @see org.teiid.query.processor.ProcessorPlan#open() * @since 4.2 */ public void open() throws TeiidComponentException, TeiidProcessingException { try { // It's ok to open() the first plan, as it is not dependent on any prior commands. // See note for defect 16166 in the nextBatch() method. openPlan(); } catch (BlockedException e){ //should not happen throw e; } catch (TeiidComponentException | TeiidProcessingException e) { if (singleResult) { throw e; } Throwable cause = e; if (e.getCause() instanceof TranslatorBatchException) { TranslatorBatchException tbe = (TranslatorBatchException)e.getCause(); for (int i = 0; i < tbe.getUpdateCounts().length; i++) { updateCounts[commandIndex++] = Arrays.asList(updateCounts[i]); } } updateCounts = Arrays.copyOf(updateCounts, commandIndex); getContext().setBatchUpdateException(cause); } }
throw new TranslatorBatchException(e, Arrays.copyOf(result, size)); } catch (SQLException e) { if (batchedCommand.isSingleResult()) { throw new TranslatorBatchException(e, Arrays.copyOf(result, batchStart)); } finally { if (commitType) {
throw new TranslatorBatchException(e, Arrays.copyOf(result, size));
/** * @see org.teiid.query.processor.ProcessorPlan#open() * @since 4.2 */ public void open() throws TeiidComponentException, TeiidProcessingException { try { // It's ok to open() the first plan, as it is not dependent on any prior commands. // See note for defect 16166 in the nextBatch() method. openPlan(); } catch (BlockedException e){ //should not happen throw e; } catch (TeiidComponentException | TeiidProcessingException e) { if (singleResult) { throw e; } Throwable cause = e; if (e.getCause() instanceof TranslatorBatchException) { TranslatorBatchException tbe = (TranslatorBatchException)e.getCause(); for (int i = 0; i < tbe.getUpdateCounts().length; i++) { updateCounts[commandIndex++] = Arrays.asList(updateCounts[i]); } } updateCounts = Arrays.copyOf(updateCounts, commandIndex); getContext().setBatchUpdateException(cause); } }
/** * @see org.teiid.query.processor.ProcessorPlan#open() * @since 4.2 */ public void open() throws TeiidComponentException, TeiidProcessingException { try { // It's ok to open() the first plan, as it is not dependent on any prior commands. // See note for defect 16166 in the nextBatch() method. openPlan(); } catch (BlockedException e){ //should not happen throw e; } catch (TeiidComponentException | TeiidProcessingException e) { if (singleResult) { throw e; } Throwable cause = e; if (e.getCause() instanceof TranslatorBatchException) { TranslatorBatchException tbe = (TranslatorBatchException)e.getCause(); for (int i = 0; i < tbe.getUpdateCounts().length; i++) { updateCounts[commandIndex++] = Arrays.asList(updateCounts[i]); } } updateCounts = Arrays.copyOf(updateCounts, commandIndex); getContext().setBatchUpdateException(cause); } }
if (e.getCause() instanceof TranslatorBatchException) { TranslatorBatchException tbe = (TranslatorBatchException)e.getCause(); for (int i = 0; i < tbe.getUpdateCounts().length; i++) { updateCounts[commandIndex++] = Arrays.asList(tbe.getUpdateCounts()[i]);
if (e.getCause() instanceof TranslatorBatchException) { TranslatorBatchException tbe = (TranslatorBatchException)e.getCause(); for (int i = 0; i < tbe.getUpdateCounts().length; i++) { updateCounts[commandIndex++] = Arrays.asList(tbe.getUpdateCounts()[i]);
if (e.getCause() instanceof TranslatorBatchException) { TranslatorBatchException tbe = (TranslatorBatchException)e.getCause(); for (int i = 0; i < tbe.getUpdateCounts().length; i++) { updateCounts[commandIndex++] = Arrays.asList(tbe.getUpdateCounts()[i]);