pub trait SchemaHandler<Cx = RequestContext>:
Send
+ Sync
+ 'static {
// Required methods
fn list_schemas<'life0, 'async_trait>(
&'life0 self,
request: ListSchemasRequest,
context: Cx,
) -> Pin<Box<dyn Future<Output = Result<ListSchemasResponse>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn create_schema<'life0, 'async_trait>(
&'life0 self,
request: CreateSchemaRequest,
context: Cx,
) -> Pin<Box<dyn Future<Output = Result<Schema>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_schema<'life0, 'async_trait>(
&'life0 self,
request: GetSchemaRequest,
context: Cx,
) -> Pin<Box<dyn Future<Output = Result<Schema>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn update_schema<'life0, 'async_trait>(
&'life0 self,
request: UpdateSchemaRequest,
context: Cx,
) -> Pin<Box<dyn Future<Output = Result<Schema>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete_schema<'life0, 'async_trait>(
&'life0 self,
request: DeleteSchemaRequest,
context: Cx,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Required Methods§
Sourcefn list_schemas<'life0, 'async_trait>(
&'life0 self,
request: ListSchemasRequest,
context: Cx,
) -> Pin<Box<dyn Future<Output = Result<ListSchemasResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_schemas<'life0, 'async_trait>(
&'life0 self,
request: ListSchemasRequest,
context: Cx,
) -> Pin<Box<dyn Future<Output = Result<ListSchemasResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets an array of schemas for a catalog in the metastore. If the caller is the metastore admin or the owner of the parent catalog, all schemas for the catalog will be retrieved. Otherwise, only schemas owned by the caller (or for which the caller has the USE_SCHEMA privilege) will be retrieved. There is no guarantee of a specific ordering of the elements in the array.
Sourcefn create_schema<'life0, 'async_trait>(
&'life0 self,
request: CreateSchemaRequest,
context: Cx,
) -> Pin<Box<dyn Future<Output = Result<Schema>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_schema<'life0, 'async_trait>(
&'life0 self,
request: CreateSchemaRequest,
context: Cx,
) -> Pin<Box<dyn Future<Output = Result<Schema>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Creates a new schema for catalog in the Metatastore. The caller must be a metastore admin, or have the CREATE_SCHEMA privilege in the parent catalog.
Sourcefn get_schema<'life0, 'async_trait>(
&'life0 self,
request: GetSchemaRequest,
context: Cx,
) -> Pin<Box<dyn Future<Output = Result<Schema>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_schema<'life0, 'async_trait>(
&'life0 self,
request: GetSchemaRequest,
context: Cx,
) -> Pin<Box<dyn Future<Output = Result<Schema>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets the specified schema within the metastore. The caller must be a metastore admin, the owner of the schema, or a user that has the USE_SCHEMA privilege on the schema.
Sourcefn update_schema<'life0, 'async_trait>(
&'life0 self,
request: UpdateSchemaRequest,
context: Cx,
) -> Pin<Box<dyn Future<Output = Result<Schema>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update_schema<'life0, 'async_trait>(
&'life0 self,
request: UpdateSchemaRequest,
context: Cx,
) -> Pin<Box<dyn Future<Output = Result<Schema>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Updates a schema for a catalog. The caller must be the owner of the schema or a metastore admin. If the caller is a metastore admin, only the owner field can be changed in the update. If the name field must be updated, the caller must be a metastore admin or have the CREATE_SCHEMA privilege on the parent catalog.
Sourcefn delete_schema<'life0, 'async_trait>(
&'life0 self,
request: DeleteSchemaRequest,
context: Cx,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_schema<'life0, 'async_trait>(
&'life0 self,
request: DeleteSchemaRequest,
context: Cx,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Deletes the specified schema from the parent catalog. The caller must be the owner of the schema or an owner of the parent catalog.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".