Package org.teiid.translator.jdbc
Class JDBCUpdateExecution
- java.lang.Object
-
- org.teiid.translator.jdbc.JDBCBaseExecution
-
- org.teiid.translator.jdbc.JDBCUpdateExecution
-
- All Implemented Interfaces:
Execution
,UpdateExecution
- Direct Known Subclasses:
PhoenixUpdateExecution
public class JDBCUpdateExecution extends JDBCBaseExecution implements UpdateExecution
-
-
Field Summary
-
Fields inherited from class org.teiid.translator.jdbc.JDBCBaseExecution
command, connection, context, executionFactory, fetchSize, statement, trimString
-
-
Constructor Summary
Constructors Constructor Description JDBCUpdateExecution(Command command, Connection connection, ExecutionContext context, JDBCExecutionFactory env)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute()
Execute the associated command.int[]
execute(BatchedUpdates batchedCommand)
int[]
getUpdateCounts()
Returns the update counts for the execution.void
setAtomic(boolean atomic)
void
setMaxPreparedInsertBatchSize(int maxPreparedInsertBatchSize)
-
Methods inherited from class org.teiid.translator.jdbc.JDBCBaseExecution
addStatementWarnings, bind, cancel, close, getCallableStatement, getConnection, getPreparedStatement, getStatement, setSizeContraints, translateCommand
-
-
-
-
Constructor Detail
-
JDBCUpdateExecution
public JDBCUpdateExecution(Command command, Connection connection, ExecutionContext context, JDBCExecutionFactory env)
-
-
Method Detail
-
execute
public void execute() throws TranslatorException
Description copied from interface:Execution
Execute the associated command. Results will be retrieved through a specific sub-interface call.- Specified by:
execute
in interfaceExecution
- Throws:
TranslatorException
-
execute
public int[] execute(BatchedUpdates batchedCommand) throws TranslatorException
- Throws:
TranslatorException
-
getUpdateCounts
public int[] getUpdateCounts() throws DataNotAvailableException, TranslatorException
Description copied from interface:UpdateExecution
Returns the update counts for the execution.
A single positive integer value is expected for non bulk/batch commands.
bulk/batch should return an integer for each value/command. 0 or greater for successful update count, -2 for no info, -3 failure- Specified by:
getUpdateCounts
in interfaceUpdateExecution
- Returns:
- the update counts corresponding to the command executed
- Throws:
DataNotAvailableException
TranslatorException
-
setMaxPreparedInsertBatchSize
public void setMaxPreparedInsertBatchSize(int maxPreparedInsertBatchSize)
-
setAtomic
public void setAtomic(boolean atomic)
-
-