Class RelationalDatabaseSchema

    • Method Detail

      • getSchemaPrefix

        private static String getSchemaPrefix​(String serverName)
      • tableIds

        public Set<TableId> tableIds()
        Returns the set of table ids included in the current filter configuration.
      • schemaFor

        public TableSchema schemaFor​(TableId id)
        Get the Schema information for the table with the given identifier, if that table exists and is included by the filter configuration.

        Note that the Schema will not contain any columns that have been filtered out.

        Specified by:
        schemaFor in interface DatabaseSchema<TableId>
        Parameters:
        id - the table identifier; may be null
        Returns:
        the schema information, or null if there is no table with the given identifier, if the identifier is null, or if the table has been excluded by the filters
      • tableFor

        public Table tableFor​(TableId id)
        Get the Table meta-data for the table with the given identifier, if that table exists and is included by the filter configuration
        Parameters:
        id - the table identifier; may be null
        Returns:
        the current table definition, or null if there is no table with the given identifier, if the identifier is null, or if the table has been excluded by the filters
      • isHistorized

        public boolean isHistorized()
        Description copied from interface: DatabaseSchema
        Whether this schema is historized (i.e. a history of all schema changes is kept which is recovered upon connector restart) or not.
        Specified by:
        isHistorized in interface DatabaseSchema<TableId>
      • tables

        protected Tables tables()
      • clearSchemas

        protected void clearSchemas()
      • buildAndRegisterSchema

        protected void buildAndRegisterSchema​(Table table)
        Builds up the CDC event schema for the given table and stores it in this schema.
      • removeSchema

        protected void removeSchema​(TableId id)
      • getEnvelopeSchemaName

        private String getEnvelopeSchemaName​(Table table)
      • tableInformationComplete

        public boolean tableInformationComplete()
        Description copied from interface: DatabaseSchema
        Indicates whether or not table names are guaranteed to be fully present, regardless of whether or not a snapshot has been performed.
        Specified by:
        tableInformationComplete in interface DatabaseSchema<TableId>
        Returns:
        boolean indicating if table names are present
      • refresh

        public void refresh​(Table table)
        Refreshes the schema content with a table constructed externally
        Parameters:
        table - constructed externally - typically from decoder metadata or an external signal
      • refreshSchema

        protected void refreshSchema​(TableId id)