public interface SupportsSchemas
| Modifier and Type | Method and Description |
|---|---|
Schema |
alterSchema(NameIdentifier ident,
SchemaChange... changes)
Apply the metadata change to a schema in the catalog.
|
Schema |
createSchema(NameIdentifier ident,
java.lang.String comment,
java.util.Map<java.lang.String,java.lang.String> properties)
Create a schema in the catalog.
|
boolean |
dropSchema(NameIdentifier ident,
boolean cascade)
Drop a schema from the catalog.
|
NameIdentifier[] |
listSchemas(Namespace namespace)
List schemas under a namespace.
|
Schema |
loadSchema(NameIdentifier ident)
Load metadata properties for a schema.
|
default boolean |
schemaExists(NameIdentifier ident)
Check if a schema exists.
|
NameIdentifier[] listSchemas(Namespace namespace) throws NoSuchCatalogException
If an entity such as a table, view exists, its parent schemas must also exist and must be returned by this discovery method. For example, if table a.b.t exists, this method invoked as listSchemas(a) must return [a.b] in the result array
namespace - The namespace to list.NoSuchCatalogException - If the catalog does not exist.default boolean schemaExists(NameIdentifier ident)
If an entity such as a table, view exists, its parent namespaces must also exist. For example, if table a.b.t exists, this method invoked as schemaExists(a.b) must return true.
ident - The name identifier of the schema.Schema createSchema(NameIdentifier ident, java.lang.String comment, java.util.Map<java.lang.String,java.lang.String> properties) throws NoSuchCatalogException, SchemaAlreadyExistsException
ident - The name identifier of the schema.comment - The comment of the schema.properties - The properties of the schema.NoSuchCatalogException - If the catalog does not exist.SchemaAlreadyExistsException - If the schema already exists.Schema loadSchema(NameIdentifier ident) throws NoSuchSchemaException
ident - The name identifier of the schema.NoSuchSchemaException - If the schema does not exist (optional).Schema alterSchema(NameIdentifier ident, SchemaChange... changes) throws NoSuchSchemaException
ident - The name identifier of the schema.changes - The metadata changes to apply.NoSuchSchemaException - If the schema does not exist.boolean dropSchema(NameIdentifier ident, boolean cascade) throws NonEmptySchemaException
If the catalog implementation does not support this operation, it may throw UnsupportedOperationException.
ident - The name identifier of the schema.cascade - If true, recursively drop all objects within the schema.NonEmptySchemaException - If the schema is not empty and cascade is false.