Skip to main content

CatalogHandler

Trait CatalogHandler 

Source
pub trait CatalogHandler<Cx = RequestContext>:
    Send
    + Sync
    + 'static {
    // Required methods
    fn list_catalogs<'life0, 'async_trait>(
        &'life0 self,
        request: ListCatalogsRequest,
        context: Cx,
    ) -> Pin<Box<dyn Future<Output = Result<ListCatalogsResponse>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn create_catalog<'life0, 'async_trait>(
        &'life0 self,
        request: CreateCatalogRequest,
        context: Cx,
    ) -> Pin<Box<dyn Future<Output = Result<Catalog>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_catalog<'life0, 'async_trait>(
        &'life0 self,
        request: GetCatalogRequest,
        context: Cx,
    ) -> Pin<Box<dyn Future<Output = Result<Catalog>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn update_catalog<'life0, 'async_trait>(
        &'life0 self,
        request: UpdateCatalogRequest,
        context: Cx,
    ) -> Pin<Box<dyn Future<Output = Result<Catalog>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn delete_catalog<'life0, 'async_trait>(
        &'life0 self,
        request: DeleteCatalogRequest,
        context: Cx,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn list_catalogs<'life0, 'async_trait>( &'life0 self, request: ListCatalogsRequest, context: Cx, ) -> Pin<Box<dyn Future<Output = Result<ListCatalogsResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List catalogs

Gets an array of catalogs in the metastore. If the caller is the metastore admin, all catalogs will be retrieved. Otherwise, only catalogs owned by the caller (or for which the caller has the USE_CATALOG privilege) will be retrieved. There is no guarantee of a specific ordering of the elements in the array.

Source

fn create_catalog<'life0, 'async_trait>( &'life0 self, request: CreateCatalogRequest, context: Cx, ) -> Pin<Box<dyn Future<Output = Result<Catalog>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Create a new catalog

Creates a new catalog instance in the parent metastore if the caller is a metastore admin or has the CREATE_CATALOG privilege.

Source

fn get_catalog<'life0, 'async_trait>( &'life0 self, request: GetCatalogRequest, context: Cx, ) -> Pin<Box<dyn Future<Output = Result<Catalog>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get a catalog

Gets the specified catalog in a metastore. The caller must be a metastore admin, the owner of the catalog, or a user that has the USE_CATALOG privilege set for their account.

Source

fn update_catalog<'life0, 'async_trait>( &'life0 self, request: UpdateCatalogRequest, context: Cx, ) -> Pin<Box<dyn Future<Output = Result<Catalog>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Update a catalog

Updates the catalog that matches the supplied name. The caller must be either the owner of the catalog, or a metastore admin (when changing the owner field of the catalog).

Source

fn delete_catalog<'life0, 'async_trait>( &'life0 self, request: DeleteCatalogRequest, context: Cx, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Delete a catalog

Deletes the catalog that matches the supplied name. The caller must be a metastore admin or the owner of the catalog.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§