| Modifier and Type | Field and Description |
|---|---|
| protected int | batchsize
Field batchsize |
| protected PyObject | bindings
Field bindings |
| protected Set | exclude
Field exclude |
| protected PyDictionary | indexedBindings
Field indexedBindings |
| protected PyList | rows
Field rows |
| protected PyObject | sql
Field sql |
| Access | Constructor and Description |
|---|---|
| public | DBSink(PyConnection
the database connection connection, Class<T> a custom DataHandler for the cursor, can be None dataHandler, String the table to insert the data tableName, PyObject the columns to be excluded from insertion on the destination, all if None exclude, PyObject the optional bindings for the destination, this allows morphing of types during the copy bindings, int the optional batchsize for the inserts batchsize)Constructor for handling the consumption of data. |
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| public void | end()
Implements com. Handles flushing any buffers and closes the cursor. |
| protected boolean | |
| public void | |
| public void |
| batchsize | back to summary |
|---|---|
| protected int batchsize Field batchsize | |
| bindings | back to summary |
|---|---|
| protected PyObject bindings Field bindings | |
| exclude | back to summary |
|---|---|
| protected Set<E> exclude Field exclude | |
| indexedBindings | back to summary |
|---|---|
| protected PyDictionary indexedBindings Field indexedBindings | |
| rows | back to summary |
|---|---|
| protected PyList rows Field rows | |
| sql | back to summary |
|---|---|
| protected PyObject sql Field sql | |
| DBSink | back to summary |
|---|---|
| public DBSink(PyConnection connection, Class<T> dataHandler, String tableName, PyObject exclude, PyObject bindings, int batchsize) Constructor for handling the consumption of data.
| |
| createSql | back to summary |
|---|---|
| protected void createSql(PyObject row) Create the insert statement given the header row. | |
| end | back to summary |
|---|---|
| public void end() Implements com. Handles flushing any buffers and closes the cursor. | |
| excluded | back to summary |
|---|---|
| protected boolean excluded(PyObject key) Return true if the key (converted to lowercase) is not found in the exclude list. | |
| row | back to summary |
|---|---|
| public void row(PyObject row) Implements com. Handle the row. Insert the data into the correct table and columns. No updates are done. | |
| start | back to summary |
|---|---|
| public void start() Implements com. Method start | |