Class InformixConnection

java.lang.Object
io.debezium.jdbc.JdbcConnection
io.debezium.connector.informix.InformixConnection
All Implemented Interfaces:
AutoCloseable

public class InformixConnection extends io.debezium.jdbc.JdbcConnection
JdbcConnection extension to be used with IBM Informix
Author:
Laoflch Luo, Xiaolin Zhang, Lars M Johansson
  • Nested Class Summary

    Nested classes/interfaces inherited from class io.debezium.jdbc.JdbcConnection

    io.debezium.jdbc.JdbcConnection.BlockingMultiResultSetConsumer, io.debezium.jdbc.JdbcConnection.BlockingResultSetConsumer, io.debezium.jdbc.JdbcConnection.CallPreparer, io.debezium.jdbc.JdbcConnection.ConnectionFactory, io.debezium.jdbc.JdbcConnection.MultiResultSetConsumer, io.debezium.jdbc.JdbcConnection.Operations, io.debezium.jdbc.JdbcConnection.ParameterResultSetConsumer, io.debezium.jdbc.JdbcConnection.ResultSetConsumer, io.debezium.jdbc.JdbcConnection.ResultSetExtractor<T extends Object>, io.debezium.jdbc.JdbcConnection.ResultSetMapper<T extends Object>, io.debezium.jdbc.JdbcConnection.StatementFactory, io.debezium.jdbc.JdbcConnection.StatementPreparer
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final io.debezium.jdbc.JdbcConnection.ConnectionFactory
     
    private static final String
     
    private static final String
     
    private static final String
     
    private static final String
     
    private static final org.slf4j.Logger
     
    private static final String
     
    private final String
    actual name of the database, which could differ in casing from the database name given in the connector config.
    private static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    InformixConnection(io.debezium.jdbc.JdbcConfiguration config)
    Creates a new connection using the supplied configuration.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a JDBC connection string for the current configuration.
     
     
    Calculates the highest available Log Sequence Number.
    private Lsn
     
     
    io.debezium.relational.Table
    getTableSchemaFromTableId(io.debezium.relational.TableId tableId)
     
     
     
    quotedTableIdString(io.debezium.relational.TableId tableId)
     
    private String
     
    boolean
    validateLogPosition(io.debezium.pipeline.spi.Partition partition, io.debezium.pipeline.spi.OffsetContext offset, io.debezium.config.CommonConnectorConfig config)
     

    Methods inherited from class io.debezium.jdbc.JdbcConnection

    buildSelectWithRowLimits, call, chunkQueryBuilder, close, commit, config, connect, connection, connection, connectionString, createTableId, database, escapeEscapeSequence, execute, execute, executeWithoutCommitting, getAttributeDetails, getColumnsDetails, getColumnValue, getQualifiedTableName, isConnected, isNullable, isTableType, isTableUniqueIndexIncluded, isValid, loadKeyStore, overrideColumn, parseSqlStatementString, patternBasedFactory, patternBasedFactory, prepareQuery, prepareQuery, prepareQuery, prepareQuery, prepareQuery, prepareQueryAndMap, prepareQueryWithBlockingConsumer, prepareUpdate, print, print, query, query, queryAndMap, queryAndMap, querySingleValue, queryWithBlockingConsumer, readAllCatalogNames, readAllSchemaNames, readAllTableNames, readPrimaryKeyNames, readPrimaryKeyOrUniqueIndexNames, readSchema, readTableColumn, readTableNames, readTablePreparedStatement, readTableStatement, readTableUniqueIndices, reselectColumns, reselectColumns, resolveCatalogName, resolveJdbcType, resolveNativeType, rollback, rowToArray, setAutoCommit, setQueryColumnValue, singleResultMapper, supportedTableTypes, tableTypes, username

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • GET_DATABASE_NAME

      private static final String GET_DATABASE_NAME
      See Also:
    • GET_MAX_LSN

      private static final String GET_MAX_LSN
      See Also:
    • GET_MIN_LSN

      private static final String GET_MIN_LSN
      See Also:
    • GET_CURRENT_TIMESTAMP

      private static final String GET_CURRENT_TIMESTAMP
      See Also:
    • QUOTED_CHARACTER

      private static final String QUOTED_CHARACTER
      See Also:
    • URL_PATTERN

      private static final String URL_PATTERN
    • FACTORY

      private static final io.debezium.jdbc.JdbcConnection.ConnectionFactory FACTORY
    • realDatabaseName

      private final String realDatabaseName
      actual name of the database, which could differ in casing from the database name given in the connector config.
  • Constructor Details

    • InformixConnection

      public InformixConnection(io.debezium.jdbc.JdbcConfiguration config)
      Creates a new connection using the supplied configuration.
      Parameters:
      config - Configuration instance, may not be null.
  • Method Details

    • getMaxLsn

      public Lsn getMaxLsn() throws SQLException
      Calculates the highest available Log Sequence Number. Tecnically, the _exact_ highest available LSN is not available in the JDBC session, but the current page of the active logical log file is. Each logical log file is a 32-bit address space of 4k pages, thus the log position within the file is the current page number bit-shifted 12 positions to the left. This is also the logical log position the change stream client actually starts from if set to start from the 'CURRENT' position (LSN = 0). (The full logical sequence number is a 64-bit integer where the unique id of the logical log file is placed in the 32 most significant bits.)
      Returns:
      the current highest log sequence number
      Throws:
      SQLException
    • getRealDatabaseName

      public String getRealDatabaseName()
    • retrieveRealDatabaseName

      private String retrieveRealDatabaseName()
    • connectionString

      public String connectionString()
      Returns a JDBC connection string for the current configuration.
      Returns:
      a String where the variables in urlPattern are replaced with values from the configuration
    • getCurrentTimestamp

      public Optional<Instant> getCurrentTimestamp() throws SQLException
      Overrides:
      getCurrentTimestamp in class io.debezium.jdbc.JdbcConnection
      Throws:
      SQLException
    • nullsSortLast

      public Optional<Boolean> nullsSortLast()
      Overrides:
      nullsSortLast in class io.debezium.jdbc.JdbcConnection
    • quotedTableIdString

      public String quotedTableIdString(io.debezium.relational.TableId tableId)
      Overrides:
      quotedTableIdString in class io.debezium.jdbc.JdbcConnection
    • quotedColumnIdString

      public String quotedColumnIdString(String columnName)
      Overrides:
      quotedColumnIdString in class io.debezium.jdbc.JdbcConnection
    • getTableSchemaFromTableId

      public io.debezium.relational.Table getTableSchemaFromTableId(io.debezium.relational.TableId tableId) throws SQLException
      Throws:
      SQLException
    • datasource

      public DataSource datasource()
    • validateLogPosition

      public boolean validateLogPosition(io.debezium.pipeline.spi.Partition partition, io.debezium.pipeline.spi.OffsetContext offset, io.debezium.config.CommonConnectorConfig config)
    • getOldestLsn

      private Lsn getOldestLsn() throws SQLException
      Throws:
      SQLException