Interface DatabaseInformation

  • All Known Implementing Classes:
    DatabaseInformationImpl

    @Incubating
    public interface DatabaseInformation
    Provides access to information about existing schema objects (tables, sequences etc) of existing database.
    • Method Detail

      • schemaExists

        boolean schemaExists​(Namespace.Name schema)
        Check to see if the given schema already exists.
        Parameters:
        schema - The schema name
        Returns:
        true indicates a schema with the given name already exists
      • getTableInformation

        TableInformation getTableInformation​(Identifier catalogName,
                                             Identifier schemaName,
                                             Identifier tableName)
        Obtain reference to the named TableInformation
        Parameters:
        catalogName - The name of the catalog which contains the schema which the table belongs to
        schemaName - The name of the schema the table belongs to
        tableName - The table name
        Returns:
        The table information. May return null if not found.
      • getTableInformation

        TableInformation getTableInformation​(Namespace.Name schemaName,
                                             Identifier tableName)
        Obtain reference to the named TableInformation
        Parameters:
        schemaName - The name of the schema the table belongs to
        tableName - The table name
        Returns:
        The table information. May return null if not found.
      • getTableInformation

        TableInformation getTableInformation​(QualifiedTableName tableName)
        Obtain reference to the named TableInformation
        Parameters:
        tableName - The qualified table name
        Returns:
        The table information. May return null if not found.
      • getSequenceInformation

        SequenceInformation getSequenceInformation​(Identifier catalogName,
                                                   Identifier schemaName,
                                                   Identifier sequenceName)
        Obtain reference to the named SequenceInformation
        Parameters:
        catalogName - The name of the catalog which contains the schema which the sequence belongs to
        schemaName - The name of the schema the sequence belongs to
        sequenceName - The sequence name
        Returns:
        The sequence information. May return null if not found.
      • getSequenceInformation

        SequenceInformation getSequenceInformation​(Namespace.Name schemaName,
                                                   Identifier sequenceName)
        Obtain reference to the named SequenceInformation
        Parameters:
        schemaName - The name of the schema the table belongs to
        sequenceName - The sequence name
        Returns:
        The sequence information. May return null if not found.
      • getSequenceInformation

        SequenceInformation getSequenceInformation​(QualifiedSequenceName sequenceName)
        Obtain reference to the named SequenceInformation
        Parameters:
        sequenceName - The qualified sequence name
        Returns:
        The sequence information. May return null if not found.
      • catalogExists

        boolean catalogExists​(Identifier catalog)
        Check to see if the given catalog already exists.
        Parameters:
        catalog - The catalog name
        Returns:
        true indicates a catalog with the given name already exists
      • cleanup

        void cleanup()