Package com.illumon.iris.export.jdbc
Class JdbcLoggerHandle
java.lang.Object
com.illumon.iris.export.jdbc.JdbcLoggerHandle
- All Implemented Interfaces:
TableLoggerBase.Handle
public class JdbcLoggerHandle extends Object implements TableLoggerBase.Handle
A class to bind a particular Deephaven table to a JDBC table, such that updates to the source can can be
efficiently logged to JDBC. Each column in the target table is assigned a "binder" that takes the source
data and binds it to a JDBC PreparedStatement with the appropriate type.
Depending on the "mode", this will either execute INSERT/UPDATE/DELETE statements against the target table that
match the source operation, or log every change as an INSERT (if logMode==true). The latter effectively generates an
audit trail of every update to the source table.
Most binders take data directly from a ColumnSource and bind to a value with the same type (ie the binder
will call getInt on a ColumnSource and call setInt on the PreparedStatement). This avoids boxing/unboxing.
There are also two special binders that bind the rowIndex and operation values. These represent the source
row and update event that resulting in that row (Added/Removed/Modified). Logging these two values is optional,
and is most useful in "log mode".
When not in "log mode", the user must provide a set of columns that will be used as the unique row key. This may be
the rowIndex column (if present), or a subset of the data columns.
-
Method Summary
Modifier and Type Method Description void
flush()
-
Method Details
-
flush
- Throws:
SQLException
-