| java.lang.Object com.ziclix.python.sql.pipe.db.BaseDB com.ziclix.python.sql.pipe.db.DBSink
DBSink | public class DBSink extends BaseDB implements Sink(Code) | | A database consumer. All data transferred will be inserted into the appropriate table.
author: brian zimmer version: $Revision: 2414 $ |
Method Summary | |
protected void | createSql(PyObject row) Create the insert statement given the header row. | public void | end() Handles flushing any buffers and closes the cursor. | protected boolean | excluded(PyObject key) Return true if the key (converted to lowercase) is not found in the exclude list. | public void | row(PyObject row) Handle the row. | public void | start() |
batchsize | protected int batchsize(Code) | | Field batchsize
|
exclude | protected Set exclude(Code) | | Field exclude
|
DBSink | public DBSink(PyConnection connection, Class dataHandler, String tableName, PyObject exclude, PyObject bindings, int batchsize)(Code) | | Constructor for handling the consumption of data.
Parameters: connection - the database connection Parameters: dataHandler - a custom DataHandler for the cursor, can be None Parameters: tableName - the table to insert the data Parameters: exclude - the columns to be excluded from insertion on the destination, all if None Parameters: bindings - the optional bindings for the destination, this allows morphing of types during the copy Parameters: batchsize - the optional batchsize for the inserts |
createSql | protected void createSql(PyObject row)(Code) | | Create the insert statement given the header row.
|
end | public void end()(Code) | | Handles flushing any buffers and closes the cursor.
|
excluded | protected boolean excluded(PyObject key)(Code) | | Return true if the key (converted to lowercase) is not found in the exclude list.
|
row | public void row(PyObject row)(Code) | | Handle the row. Insert the data into the correct table and columns. No updates are done.
|
start | public void start()(Code) | | Method start
|
|
|