Class ProjectIntoNode
- java.lang.Object
-
- org.teiid.query.processor.relational.RelationalNode
-
- org.teiid.query.processor.relational.ProjectIntoNode
-
- All Implemented Interfaces:
Cloneable
,BatchCollector.BatchProducer
public class ProjectIntoNode extends RelationalNode
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ProjectIntoNode.Mode
-
Field Summary
-
Fields inherited from class org.teiid.query.processor.relational.RelationalNode
childCount
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ProjectIntoNode()
ProjectIntoNode(int nodeID)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
clone()
All the implementation of Cloneable interface need to implement clone() method.void
closeDirect()
PlanNode
getDescriptionProperties()
ProjectIntoNode.Mode
getMode()
String
getModelName()
protected void
getNodeString(StringBuffer str)
boolean
isTempGroupInsert()
TupleBatch
nextBatchDirect()
Get batch from child node Walk through each row of child batch Bind values to insertCommand Execute insertCommand Update insertCount When no more data is available, output batch with single row containing insertCountBoolean
requiresTransaction(boolean transactionalReads)
void
reset()
void
setConstraint(Criteria constraint)
void
setIntoElements(List intoElements)
void
setIntoGroup(GroupSymbol group)
void
setMode(ProjectIntoNode.Mode mode)
void
setModelName(String modelName)
void
setSourceHint(SourceHint property)
void
setTransactionSupport(ExecutionFactory.TransactionSupport transactionSupport)
void
setUpsert(boolean upsert)
-
Methods inherited from class org.teiid.query.processor.relational.RelationalNode
addBatchRow, addChild, close, copyTo, createLookupMap, getBatchSize, getBuffer, getBufferDirect, getBufferManager, getChildCount, getChildren, getClassName, getConnectionID, getContext, getDataManager, getElements, getEstimateNodeCardinality, getID, getNodeStatistics, getOutputElements, getParent, getProjectionIndexes, hasBuffer, hasPendingRows, initialize, isBatchFull, isClosed, isLastBatch, nextBatch, nodeToString, open, projectTuple, projectTuple, pullBatch, setContext, setElements, setEstimateDepAccessCardinality, setEstimateDepJoinCost, setEstimateJoinCost, setEstimateNodeCardinality, setEstimateNodeSetSize, setID, setParent, terminateBatches, toString, unwrapException
-
-
-
-
Method Detail
-
reset
public void reset()
- Overrides:
reset
in classRelationalNode
-
setIntoGroup
public void setIntoGroup(GroupSymbol group)
-
setIntoElements
public void setIntoElements(List intoElements)
-
setModelName
public void setModelName(String modelName)
-
nextBatchDirect
public TupleBatch nextBatchDirect() throws BlockedException, TeiidComponentException, TeiidProcessingException
Get batch from child node Walk through each row of child batch Bind values to insertCommand Execute insertCommand Update insertCount When no more data is available, output batch with single row containing insertCount- Specified by:
nextBatchDirect
in classRelationalNode
- Returns:
- Throws:
BlockedException
TeiidComponentException
TeiidProcessingException
- if exception related to user input occured
-
getNodeString
protected void getNodeString(StringBuffer str)
- Overrides:
getNodeString
in classRelationalNode
-
clone
public Object clone()
Description copied from class:RelationalNode
All the implementation of Cloneable interface need to implement clone() method. The plan is only clonable in the pre-execution stage, not the execution state (things like program state, result sets, etc). It's only safe to call that method in between query processings, in other words, it's only safe to call clone() on a plan after nextTuple() returns null, meaning the plan has finished processing.- Specified by:
clone
in classRelationalNode
-
getDescriptionProperties
public PlanNode getDescriptionProperties()
- Overrides:
getDescriptionProperties
in classRelationalNode
-
getMode
public ProjectIntoNode.Mode getMode()
-
setMode
public void setMode(ProjectIntoNode.Mode mode)
-
isTempGroupInsert
public boolean isTempGroupInsert()
-
closeDirect
public void closeDirect()
- Overrides:
closeDirect
in classRelationalNode
-
getModelName
public String getModelName()
-
requiresTransaction
public Boolean requiresTransaction(boolean transactionalReads)
- Overrides:
requiresTransaction
in classRelationalNode
- Returns:
- true if required, false if not required, and null if a single source command is issued and a transaction may be needed.
-
setConstraint
public void setConstraint(Criteria constraint)
-
setTransactionSupport
public void setTransactionSupport(ExecutionFactory.TransactionSupport transactionSupport)
-
setSourceHint
public void setSourceHint(SourceHint property)
-
setUpsert
public void setUpsert(boolean upsert)
-
-