@Override public TupleBatch nextBatch() throws BlockedException, TeiidComponentException, TeiidProcessingException { if (blockContext != null) { this.getContext().getTransactionServer().resume(blockContext); } try { return nextBatchDirect(); } finally { //ensure that the generatedkeys don't escape getContext().clearGeneratedKeys(); if (blockContext != null) { this.getContext().getTransactionServer().suspend(blockContext); } } }
@Override public TupleBatch nextBatch() throws BlockedException, TeiidComponentException, TeiidProcessingException { if (blockContext != null) { this.getContext().getTransactionServer().resume(blockContext); } try { return nextBatchDirect(); } finally { //ensure that the generatedkeys don't escape getContext().clearGeneratedKeys(); if (blockContext != null) { this.getContext().getTransactionServer().suspend(blockContext); } } }
boolean evaluateCriteria(Criteria condition) throws BlockedException, TeiidProcessingException, TeiidComponentException { evaluator.initialize(getContext(), getDataManager()); return evaluator.evaluate(condition, Collections.emptyList()); }
Object evaluateExpression(Expression expression) throws BlockedException, TeiidProcessingException, TeiidComponentException { evaluator.initialize(getContext(), getDataManager()); return evaluator.evaluate(expression, Collections.emptyList()); }
/** * @return Returns the tempTableStore. * @since 5.5 */ public TempTableStore getTempTableStore() { if (this.programs.isEmpty()) { if (runInContext && params == null) { return getContext().getTempTableStore(); } return null; } return this.peek().getTempTableStore(); }
boolean evaluateCriteria(Criteria condition) throws BlockedException, TeiidProcessingException, TeiidComponentException { evaluator.initialize(getContext(), getDataManager()); return evaluator.evaluate(condition, Collections.emptyList()); }
/** * @return Returns the tempTableStore. * @since 5.5 */ public TempTableStore getTempTableStore() { if (this.programs.isEmpty()) { if (runInContext && params == null) { return getContext().getTempTableStore(); } return null; } return this.peek().getTempTableStore(); }
@Override public void process(ProcedurePlan procEnv) throws BlockedException, TeiidComponentException, TeiidProcessingException { boolean done = true; try { super.process(procEnv); } catch (BlockedException e) { done = false; throw e; } finally { if (done) { procEnv.getContext().popCall(); } } } };
@Override public TupleBatch nextBatch() throws BlockedException, TeiidComponentException, TeiidProcessingException { if (blockContext != null) { this.getContext().getTransactionServer().resume(blockContext); } try { return nextBatchDirect(); } finally { //ensure that the generatedkeys don't escape getContext().clearGeneratedKeys(); if (blockContext != null) { this.getContext().getTransactionServer().suspend(blockContext); } } }
@Override public void process(ProcedurePlan procEnv) throws BlockedException, TeiidComponentException, TeiidProcessingException { boolean done = true; try { super.process(procEnv); } catch (BlockedException e) { done = false; throw e; } finally { if (done) { procEnv.getContext().popCall(); } } } };
/** * @return Returns the tempTableStore. * @since 5.5 */ public TempTableStore getTempTableStore() { if (this.programs.isEmpty()) { if (runInContext && params == null) { return getContext().getTempTableStore(); } return null; } return this.peek().getTempTableStore(); }
boolean evaluateCriteria(Criteria condition) throws BlockedException, TeiidProcessingException, TeiidComponentException { evaluator.initialize(getContext(), getDataManager()); return evaluator.evaluate(condition, Collections.emptyList()); }
Object evaluateExpression(Expression expression) throws BlockedException, TeiidProcessingException, TeiidComponentException { evaluator.initialize(getContext(), getDataManager()); return evaluator.evaluate(expression, Collections.emptyList()); }
Object evaluateExpression(Expression expression) throws BlockedException, TeiidProcessingException, TeiidComponentException { evaluator.initialize(getContext(), getDataManager()); return evaluator.evaluate(expression, Collections.emptyList()); }
/** * @see ProcessorPlan#initialize(ProcessorDataManager, Object) */ public void initialize(CommandContext context, ProcessorDataManager dataMgr, BufferManager bufferMgr) { this.bufferMgr = bufferMgr; this.batchSize = bufferMgr.getProcessorBatchSize(getOutputElements()); this.parentContext = context.getVariableContext(); setContext(context.clone()); this.parentDataMrg = dataMgr; if (evaluator == null) { this.evaluator = new SubqueryAwareEvaluator(Collections.emptyMap(), getDataManager(), getContext(), this.bufferMgr); } }
/** * @see ProcessorPlan#initialize(ProcessorDataManager, Object) */ public void initialize(CommandContext context, ProcessorDataManager dataMgr, BufferManager bufferMgr) { this.bufferMgr = bufferMgr; this.batchSize = bufferMgr.getProcessorBatchSize(getOutputElements()); this.parentContext = context.getVariableContext(); setContext(context.clone()); this.parentDataMrg = dataMgr; if (evaluator == null) { this.evaluator = new SubqueryAwareEvaluator(Collections.emptyMap(), getDataManager(), getContext(), this.bufferMgr); } }
/** * @see ProcessorPlan#initialize(ProcessorDataManager, Object) */ public void initialize(CommandContext context, ProcessorDataManager dataMgr, BufferManager bufferMgr) { this.bufferMgr = bufferMgr; this.batchSize = bufferMgr.getProcessorBatchSize(getOutputElements()); this.parentContext = context.getVariableContext(); setContext(context.clone()); this.parentDataMrg = dataMgr; if (evaluator == null) { this.evaluator = new SubqueryAwareEvaluator(Collections.emptyMap(), getDataManager(), getContext(), this.bufferMgr); } }
@Override public void process(ProcedurePlan env) throws TeiidComponentException, TeiidProcessingException, TeiidSQLException { Object value = env.evaluateExpression(expression); LogManager.logTrace(org.teiid.logging.LogConstants.CTX_DQP, "Processing RAISE with the value :", value); //$NON-NLS-1$ if (warning) { env.getContext().addWarning((Exception)value); return; } if (value == null) { throw new TeiidProcessingException(QueryPlugin.Event.TEIID31122, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31122)); } throw TeiidSQLException.create((Exception)value); }
@Override public void process(ProcedurePlan env) throws TeiidComponentException, TeiidProcessingException, TeiidSQLException { Object value = env.evaluateExpression(expression); LogManager.logTrace(org.teiid.logging.LogConstants.CTX_DQP, "Processing RAISE with the value :", value); //$NON-NLS-1$ if (warning) { env.getContext().addWarning((Exception)value); return; } if (value == null) { throw new TeiidProcessingException(QueryPlugin.Event.TEIID31122, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31122)); } throw TeiidSQLException.create((Exception)value); }
@Override public void process(ProcedurePlan env) throws TeiidComponentException, TeiidProcessingException, TeiidSQLException { Object value = env.evaluateExpression(expression); LogManager.logTrace(org.teiid.logging.LogConstants.CTX_DQP, "Processing RAISE with the value :", value); //$NON-NLS-1$ if (warning) { env.getContext().addWarning((Exception)value); return; } if (value == null) { throw new TeiidProcessingException(QueryPlugin.Event.TEIID31122, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID31122)); } throw TeiidSQLException.create((Exception)value); }