Class CatalogServiceImpl

    • Constructor Summary

      Constructors 
      Constructor Description
      CatalogServiceImpl​(org.apache.ibatis.session.SqlSessionFactory sqlSessionFactory)  
    • Constructor Detail

      • CatalogServiceImpl

        public CatalogServiceImpl​(org.apache.ibatis.session.SqlSessionFactory sqlSessionFactory)
    • Method Detail

      • databaseExists

        public boolean databaseExists​(java.lang.String catalog,
                                      java.lang.String database)
        Specified by:
        databaseExists in interface CatalogService
      • insertDatabase

        public void insertDatabase​(CatalogDatabaseDTO database)
                            throws org.apache.flink.table.catalog.exceptions.DatabaseAlreadyExistException
        Specified by:
        insertDatabase in interface CatalogService
        Throws:
        org.apache.flink.table.catalog.exceptions.DatabaseAlreadyExistException
      • updateDatabase

        public void updateDatabase​(CatalogDatabaseDTO database)
                            throws org.apache.flink.table.catalog.exceptions.DatabaseNotExistException
        Specified by:
        updateDatabase in interface CatalogService
        Throws:
        org.apache.flink.table.catalog.exceptions.DatabaseNotExistException
      • deleteDatabase

        public void deleteDatabase​(java.lang.String catalog,
                                   java.lang.String database)
                            throws org.apache.flink.table.catalog.exceptions.DatabaseNotExistException
        Specified by:
        deleteDatabase in interface CatalogService
        Throws:
        org.apache.flink.table.catalog.exceptions.DatabaseNotExistException
      • isDatabaseEmpty

        public boolean isDatabaseEmpty​(java.lang.String catalog,
                                       java.lang.String database)
        Specified by:
        isDatabaseEmpty in interface CatalogService
      • getTable

        public java.util.Optional<CatalogTableDTO> getTable​(java.lang.String catalog,
                                                            java.lang.String database,
                                                            java.lang.String table)
        Specified by:
        getTable in interface CatalogService
      • tableExists

        public boolean tableExists​(java.lang.String catalog,
                                   java.lang.String database,
                                   java.lang.String table)
        Specified by:
        tableExists in interface CatalogService
      • insertTable

        public void insertTable​(java.lang.String catalog,
                                java.lang.String database,
                                CatalogTableDTO table)
                         throws org.apache.flink.table.catalog.exceptions.DatabaseNotExistException,
                                org.apache.flink.table.catalog.exceptions.TableAlreadyExistException
        Specified by:
        insertTable in interface CatalogService
        Throws:
        org.apache.flink.table.catalog.exceptions.DatabaseNotExistException
        org.apache.flink.table.catalog.exceptions.TableAlreadyExistException
      • updateTable

        public void updateTable​(java.lang.String catalog,
                                java.lang.String database,
                                CatalogTableDTO table)
                         throws org.apache.flink.table.catalog.exceptions.TableNotExistException
        Specified by:
        updateTable in interface CatalogService
        Throws:
        org.apache.flink.table.catalog.exceptions.TableNotExistException
      • renameTable

        public void renameTable​(java.lang.String catalog,
                                java.lang.String database,
                                java.lang.String currentName,
                                java.lang.String newName)
                         throws org.apache.flink.table.catalog.exceptions.TableAlreadyExistException,
                                org.apache.flink.table.catalog.exceptions.TableNotExistException
        Specified by:
        renameTable in interface CatalogService
        Throws:
        org.apache.flink.table.catalog.exceptions.TableAlreadyExistException
        org.apache.flink.table.catalog.exceptions.TableNotExistException
      • deleteTable

        public void deleteTable​(java.lang.String catalog,
                                java.lang.String database,
                                java.lang.String table)
                         throws org.apache.flink.table.catalog.exceptions.TableNotExistException
        Specified by:
        deleteTable in interface CatalogService
        Throws:
        org.apache.flink.table.catalog.exceptions.TableNotExistException
      • getView

        public java.util.Optional<CatalogTableDTO> getView​(java.lang.String catalog,
                                                           java.lang.String database,
                                                           java.lang.String view)
        Specified by:
        getView in interface CatalogService
      • viewExists

        public boolean viewExists​(java.lang.String catalog,
                                  java.lang.String database,
                                  java.lang.String view)
        Specified by:
        viewExists in interface CatalogService
      • insertView

        public void insertView​(java.lang.String catalog,
                               java.lang.String database,
                               CatalogTableDTO view)
                        throws org.apache.flink.table.catalog.exceptions.DatabaseNotExistException,
                               org.apache.flink.table.catalog.exceptions.TableAlreadyExistException
        Specified by:
        insertView in interface CatalogService
        Throws:
        org.apache.flink.table.catalog.exceptions.DatabaseNotExistException
        org.apache.flink.table.catalog.exceptions.TableAlreadyExistException
      • updateView

        public void updateView​(java.lang.String catalog,
                               java.lang.String database,
                               CatalogTableDTO view)
                        throws org.apache.flink.table.catalog.exceptions.TableNotExistException
        Specified by:
        updateView in interface CatalogService
        Throws:
        org.apache.flink.table.catalog.exceptions.TableNotExistException
      • renameView

        public void renameView​(java.lang.String catalog,
                               java.lang.String database,
                               java.lang.String currentName,
                               java.lang.String newName)
                        throws org.apache.flink.table.catalog.exceptions.TableNotExistException,
                               org.apache.flink.table.catalog.exceptions.TableAlreadyExistException
        Specified by:
        renameView in interface CatalogService
        Throws:
        org.apache.flink.table.catalog.exceptions.TableNotExistException
        org.apache.flink.table.catalog.exceptions.TableAlreadyExistException
      • deleteView

        public void deleteView​(java.lang.String catalog,
                               java.lang.String database,
                               java.lang.String viewName)
                        throws org.apache.flink.table.catalog.exceptions.TableNotExistException
        Specified by:
        deleteView in interface CatalogService
        Throws:
        org.apache.flink.table.catalog.exceptions.TableNotExistException
      • getFunction

        public java.util.Optional<CatalogFunctionDTO> getFunction​(java.lang.String catalog,
                                                                  java.lang.String database,
                                                                  java.lang.String function)
        Specified by:
        getFunction in interface CatalogService
      • functionExists

        public boolean functionExists​(java.lang.String catalog,
                                      java.lang.String database,
                                      java.lang.String function)
        Specified by:
        functionExists in interface CatalogService
      • insertFunction

        public void insertFunction​(java.lang.String catalog,
                                   java.lang.String database,
                                   CatalogFunctionDTO function)
                            throws org.apache.flink.table.catalog.exceptions.DatabaseNotExistException,
                                   org.apache.flink.table.catalog.exceptions.FunctionAlreadyExistException
        Specified by:
        insertFunction in interface CatalogService
        Throws:
        org.apache.flink.table.catalog.exceptions.DatabaseNotExistException
        org.apache.flink.table.catalog.exceptions.FunctionAlreadyExistException
      • updateFunction

        public void updateFunction​(java.lang.String catalog,
                                   java.lang.String database,
                                   CatalogFunctionDTO function)
                            throws org.apache.flink.table.catalog.exceptions.FunctionNotExistException
        Specified by:
        updateFunction in interface CatalogService
        Throws:
        org.apache.flink.table.catalog.exceptions.FunctionNotExistException
      • deleteFunction

        public void deleteFunction​(java.lang.String catalog,
                                   java.lang.String database,
                                   java.lang.String functionName)
                            throws org.apache.flink.table.catalog.exceptions.FunctionNotExistException
        Specified by:
        deleteFunction in interface CatalogService
        Throws:
        org.apache.flink.table.catalog.exceptions.FunctionNotExistException