continue; Object value = this.evaluateExpression(expr);
continue; Object value = this.evaluateExpression(expr);
continue; Object value = this.evaluateExpression(expr);
@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); }
/** * <p> Updates the current variable context with a value for the Variable * defined using a DeclareInstruction, the variable value is obtained by either processing * a expression or a command(stored as a processplan). The Processing of the command is * expected to result in 1 column, 1 row tuple, if more than a row is returned an exception * is thrown. Also updates the program counter.</p> * @throws BlockedException * @throws TeiidComponentException if error processing command or expression on this instruction */ public void process(ProcedurePlan procEnv) throws BlockedException, TeiidComponentException, TeiidProcessingException { VariableContext varContext = procEnv.getCurrentVariableContext(); Object value = null; if (this.expression != null) { value = procEnv.evaluateExpression(this.expression); } varContext.setValue(getVariable(), value); LogManager.logTrace(LogConstants.CTX_DQP, new Object[] {this.toString() + " The variable " //$NON-NLS-1$ + getVariable() + " in the variablecontext is updated with the value :", value}); //$NON-NLS-1$ }
/** * <p> Updates the current variable context with a value for the Variable * defined using a DeclareInstruction, the variable value is obtained by either processing * a expression or a command(stored as a processplan). The Processing of the command is * expected to result in 1 column, 1 row tuple, if more than a row is returned an exception * is thrown. Also updates the program counter.</p> * @throws BlockedException * @throws TeiidComponentException if error processing command or expression on this instruction */ public void process(ProcedurePlan procEnv) throws BlockedException, TeiidComponentException, TeiidProcessingException { VariableContext varContext = procEnv.getCurrentVariableContext(); Object value = null; if (this.expression != null) { value = procEnv.evaluateExpression(this.expression); } varContext.setValue(getVariable(), value); LogManager.logTrace(LogConstants.CTX_DQP, new Object[] {this.toString() + " The variable " //$NON-NLS-1$ + getVariable() + " in the variablecontext is updated with the value :", value}); //$NON-NLS-1$ }
/** * <p> Updates the current variable context with a value for the Variable * defined using a DeclareInstruction, the variable value is obtained by either processing * a expression or a command(stored as a processplan). The Processing of the command is * expected to result in 1 column, 1 row tuple, if more than a row is returned an exception * is thrown. Also updates the program counter.</p> * @throws BlockedException * @throws TeiidComponentException if error processing command or expression on this instruction */ public void process(ProcedurePlan procEnv) throws BlockedException, TeiidComponentException, TeiidProcessingException { VariableContext varContext = procEnv.getCurrentVariableContext(); Object value = null; if (this.expression != null) { value = procEnv.evaluateExpression(this.expression); } varContext.setValue(getVariable(), value); LogManager.logTrace(LogConstants.CTX_DQP, new Object[] {this.toString() + " The variable " //$NON-NLS-1$ + getVariable() + " in the variablecontext is updated with the value :", value}); //$NON-NLS-1$ }
/** * @param procEnv * @param localContext * @throws TeiidComponentException * @throws TeiidComponentException * @throws TeiidProcessingException */ private void updateContextWithUsingValues(ProcedurePlan procEnv, VariableContext localContext) throws TeiidComponentException, TeiidProcessingException { if (dynamicCommand.getUsing() != null && !dynamicCommand.getUsing().isEmpty()) { for (SetClause setClause : dynamicCommand.getUsing().getClauses()) { Object assignment = procEnv.evaluateExpression(setClause.getValue()); LogManager.logTrace(org.teiid.logging.LogConstants.CTX_DQP, new Object[] { this, " The using variable ", //$NON-NLS-1$ setClause.getSymbol(), " has value :", assignment }); //$NON-NLS-1$ localContext.setValue(setClause.getSymbol(), assignment); ElementSymbol es = setClause.getSymbol().clone(); es.getGroupSymbol().setShortName(Reserved.USING); localContext.setValue(es, assignment); } } }
/** * @param procEnv * @param localContext * @throws TeiidComponentException * @throws TeiidComponentException * @throws TeiidProcessingException */ private void updateContextWithUsingValues(ProcedurePlan procEnv, VariableContext localContext) throws TeiidComponentException, TeiidProcessingException { if (dynamicCommand.getUsing() != null && !dynamicCommand.getUsing().isEmpty()) { for (SetClause setClause : dynamicCommand.getUsing().getClauses()) { Object assignment = procEnv.evaluateExpression(setClause.getValue()); LogManager.logTrace(org.teiid.logging.LogConstants.CTX_DQP, new Object[] { this, " The using variable ", //$NON-NLS-1$ setClause.getSymbol(), " has value :", assignment }); //$NON-NLS-1$ localContext.setValue(setClause.getSymbol(), assignment); ElementSymbol es = setClause.getSymbol().clone(); es.getGroupSymbol().setShortName(Reserved.USING); localContext.setValue(es, assignment); } } }
/** * @param procEnv * @param localContext * @throws TeiidComponentException * @throws TeiidComponentException * @throws TeiidProcessingException */ private void updateContextWithUsingValues(ProcedurePlan procEnv, VariableContext localContext) throws TeiidComponentException, TeiidProcessingException { if (dynamicCommand.getUsing() != null && !dynamicCommand.getUsing().isEmpty()) { for (SetClause setClause : dynamicCommand.getUsing().getClauses()) { Object assignment = procEnv.evaluateExpression(setClause.getValue()); LogManager.logTrace(org.teiid.logging.LogConstants.CTX_DQP, new Object[] { this, " The using variable ", //$NON-NLS-1$ setClause.getSymbol(), " has value :", assignment }); //$NON-NLS-1$ localContext.setValue(setClause.getSymbol(), assignment); ElementSymbol es = setClause.getSymbol().clone(); es.getGroupSymbol().setShortName(Reserved.USING); localContext.setValue(es, assignment); } } }
Clob value = (Clob)procEnv.evaluateExpression(dynamicCommand.getSql());
Clob value = (Clob)procEnv.evaluateExpression(dynamicCommand.getSql());
Clob value = (Clob)procEnv.evaluateExpression(dynamicCommand.getSql());