Trait mz_sql::catalog::CatalogDatabase

source ·
pub trait CatalogDatabase {
    // Required methods
    fn name(&self) -> &str;
    fn id(&self) -> DatabaseId;
    fn has_schemas(&self) -> bool;
    fn schema_ids(&self) -> &BTreeMap<String, SchemaId>;
    fn schemas(&self) -> Vec<&dyn CatalogSchema>;
    fn owner_id(&self) -> RoleId;
    fn privileges(&self) -> &PrivilegeMap;
}
Expand description

A database in a SessionCatalog.

Required Methods§

source

fn name(&self) -> &str

Returns a fully-specified name of the database.

source

fn id(&self) -> DatabaseId

Returns a stable ID for the database.

source

fn has_schemas(&self) -> bool

Returns whether the database contains schemas.

source

fn schema_ids(&self) -> &BTreeMap<String, SchemaId>

Returns the schemas of the database as a map from schema name to schema ID.

source

fn schemas(&self) -> Vec<&dyn CatalogSchema>

Returns the schemas of the database.

source

fn owner_id(&self) -> RoleId

Returns the ID of the owning role.

source

fn privileges(&self) -> &PrivilegeMap

Returns the privileges associated with the database.

Implementors§