Package org.teiid.query.processor.proc
Class AssignmentInstruction
- java.lang.Object
-
- org.teiid.query.processor.proc.ProgramInstruction
-
- org.teiid.query.processor.proc.AssignmentInstruction
-
- All Implemented Interfaces:
Cloneable
public class AssignmentInstruction extends ProgramInstruction
This instruction 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.
-
-
Constructor Summary
Constructors Constructor Description AssignmentInstruction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AssignmentInstruction
clone()
Override Object.clone() to make the method public.PlanNode
getDescriptionProperties()
Expression
getExpression()
ElementSymbol
getVariable()
void
process(ProcedurePlan procEnv)
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).Boolean
requiresTransaction(boolean transactionalReads)
void
setExpression(Expression expression)
void
setVariable(ElementSymbol variable)
String
toString()
-
-
-
Method Detail
-
process
public void process(ProcedurePlan procEnv) throws BlockedException, TeiidComponentException, TeiidProcessingException
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.
- Specified by:
process
in classProgramInstruction
- Throws:
BlockedException
TeiidComponentException
- if error processing command or expression on this instructionTeiidProcessingException
-
getDescriptionProperties
public PlanNode getDescriptionProperties()
- Specified by:
getDescriptionProperties
in classProgramInstruction
-
getExpression
public Expression getExpression()
- Returns:
- Returns the expression.
-
setExpression
public void setExpression(Expression expression)
- Parameters:
expression
- The expression to set.
-
getVariable
public ElementSymbol getVariable()
- Returns:
- Returns the variable.
-
setVariable
public void setVariable(ElementSymbol variable)
- Parameters:
variable
- The variable to set.
-
clone
public AssignmentInstruction clone()
Description copied from class:ProgramInstruction
Override Object.clone() to make the method public. This method simply calls super.clone(), deferring to the default shallow cloning. Some ProcessorInstruction subclasses may need to override with custom safe or deep cloning.- Overrides:
clone
in classProgramInstruction
- Returns:
- shallow clone
- See Also:
ProgramInstruction.clone()
-
requiresTransaction
public Boolean requiresTransaction(boolean transactionalReads)
- Overrides:
requiresTransaction
in classProgramInstruction
-
-