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§
sourcefn id(&self) -> DatabaseId
fn id(&self) -> DatabaseId
Returns a stable ID for the database.
sourcefn has_schemas(&self) -> bool
fn has_schemas(&self) -> bool
Returns whether the database contains schemas.
sourcefn schema_ids(&self) -> &BTreeMap<String, SchemaId>
fn schema_ids(&self) -> &BTreeMap<String, SchemaId>
Returns the schemas of the database as a map from schema name to schema ID.
sourcefn schemas(&self) -> Vec<&dyn CatalogSchema>
fn schemas(&self) -> Vec<&dyn CatalogSchema>
Returns the schemas of the database.
sourcefn privileges(&self) -> &PrivilegeMap
fn privileges(&self) -> &PrivilegeMap
Returns the privileges associated with the database.