Module datarush.library
Class AbstractWriteToJDBC.AbstractWriteHelper
- java.lang.Object
-
- com.pervasive.datarush.operators.io.jdbc.AbstractWriteToJDBC.AbstractWriteHelper
-
- Enclosing class:
- AbstractWriteToJDBC
protected abstract static class AbstractWriteToJDBC.AbstractWriteHelper extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected PreparedStatement
batchStatement
protected Connection
connection
protected JDBCConnector
connector
protected com.pervasive.datarush.operators.io.jdbc.PreparedStatementConverter[]
converters
protected int
errorCount
protected ScalarInputField[]
fields
protected RecordInput
input
protected org.apache.commons.logging.Log
logger
protected String
onEveryRecordStatement
protected int
partitionID
protected AbstractWriteToJDBC.SqlWriteProperties
properties
protected long
recordCount
protected int
recordsInBatch
-
Constructor Summary
Constructors Constructor Description AbstractWriteHelper(JDBCConnector connector, RecordPort input, ExecutionContext ctx, String onEveryRecordStatement, AbstractWriteToJDBC.SqlWriteProperties properties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addBatch()
protected int[]
commitBatch()
protected void
doRun()
protected void
doWork()
protected void
finalBatch()
protected void
pushBatch(int[] status)
void
run()
-
-
-
Field Detail
-
connector
protected final JDBCConnector connector
-
partitionID
protected final int partitionID
-
input
protected final RecordInput input
-
fields
protected final ScalarInputField[] fields
-
logger
protected final org.apache.commons.logging.Log logger
-
connection
protected final Connection connection
-
onEveryRecordStatement
protected final String onEveryRecordStatement
-
properties
protected final AbstractWriteToJDBC.SqlWriteProperties properties
-
batchStatement
protected PreparedStatement batchStatement
-
converters
protected com.pervasive.datarush.operators.io.jdbc.PreparedStatementConverter[] converters
-
recordCount
protected long recordCount
-
recordsInBatch
protected int recordsInBatch
-
errorCount
protected int errorCount
-
-
Constructor Detail
-
AbstractWriteHelper
public AbstractWriteHelper(JDBCConnector connector, RecordPort input, ExecutionContext ctx, String onEveryRecordStatement, AbstractWriteToJDBC.SqlWriteProperties properties)
-
-
Method Detail
-
run
public void run()
-
doRun
protected void doRun() throws SQLException
- Throws:
SQLException
-
doWork
protected void doWork() throws SQLException
- Throws:
SQLException
-
commitBatch
protected int[] commitBatch() throws SQLException
- Throws:
SQLException
-
addBatch
protected void addBatch() throws SQLException
- Throws:
SQLException
-
pushBatch
protected void pushBatch(int[] status)
-
finalBatch
protected void finalBatch() throws SQLException
- Throws:
SQLException
-
-