Class PostgresObjectUtils


  • public class PostgresObjectUtils
    extends Object
    A factory for creating various Debezium objects

    It is a hack to access package-private constructor in debezium.

    • Constructor Detail

      • PostgresObjectUtils

        public PostgresObjectUtils()
    • Method Detail

      • newSchema

        public static RelationAwarePostgresSchema newSchema​(PostgresConnection connection,
                                                            io.debezium.connector.postgresql.PostgresConnectorConfig config,
                                                            io.debezium.connector.postgresql.TypeRegistry typeRegistry,
                                                            io.debezium.schema.TopicSelector<io.debezium.relational.TableId> topicSelector,
                                                            io.debezium.connector.postgresql.PostgresValueConverter valueConverter)
                                                     throws SQLException
        Create a new PostgresSchema and initialize the content of the schema.
        Throws:
        SQLException
      • newSchema

        public static RelationAwarePostgresSchema newSchema​(PostgresConnection connection,
                                                            io.debezium.connector.postgresql.PostgresConnectorConfig config,
                                                            io.debezium.connector.postgresql.TypeRegistry typeRegistry,
                                                            io.debezium.schema.TopicSelector<io.debezium.relational.TableId> topicSelector,
                                                            io.debezium.connector.postgresql.PostgresValueConverter valueConverter,
                                                            Collection<io.debezium.relational.history.TableChanges.TableChange> tableChanges)
                                                     throws SQLException
        Throws:
        SQLException
      • newTaskContext

        public static io.debezium.connector.postgresql.PostgresTaskContext newTaskContext​(io.debezium.connector.postgresql.PostgresConnectorConfig connectorConfig,
                                                                                          io.debezium.connector.postgresql.PostgresSchema schema,
                                                                                          io.debezium.schema.TopicSelector<io.debezium.relational.TableId> topicSelector)
      • newEventMetadataProvider

        public static io.debezium.connector.postgresql.PostgresEventMetadataProvider newEventMetadataProvider()
      • newPostgresValueConverterBuilder

        public static PostgresConnection.PostgresValueConverterBuilder newPostgresValueConverterBuilder​(io.debezium.connector.postgresql.PostgresConnectorConfig config)
        Create a new PostgresVauleConverterBuilder instance and offer type registry for JDBC connection.

        It is created in this package because some methods (e.g., includeUnknownDatatypes) of PostgresConnectorConfig is protected.

      • createReplicationConnection

        public static io.debezium.connector.postgresql.connection.ReplicationConnection createReplicationConnection​(io.debezium.connector.postgresql.PostgresTaskContext taskContext,
                                                                                                                    PostgresConnection postgresConnection,
                                                                                                                    boolean doSnapshot,
                                                                                                                    io.debezium.connector.postgresql.PostgresConnectorConfig connectorConfig)