pub struct FileCatalog { /* private fields */ }Expand description
File-backed table catalog.
Operations are serialized across handles in this process and refresh CURRENT before every read or mutation. One active catalog mutator is still required across processes; distributed locking is intentionally outside this implementation.
Implementations§
Source§impl FileCatalog
impl FileCatalog
pub fn open( config: &Config, catalog_config: FileCatalogConfig, ) -> CatalogResult<Self>
Sourcepub fn materialize_table(
&self,
db: Arc<Db>,
identifier: &TableIdentifier,
) -> CatalogResult<Table>
pub fn materialize_table( &self, db: Arc<Db>, identifier: &TableIdentifier, ) -> CatalogResult<Table>
Materialize the current catalog schema into one writable shard.
Calls for a shard must not run concurrently with other core schema updates.
Source§impl FileCatalog
impl FileCatalog
Sourcepub fn load_shard_schema_mapping(
&self,
identifier: &TableIdentifier,
db_id: &str,
catalog_schema_id: CatalogSchemaId,
) -> CatalogResult<ShardSchemaMapping>
pub fn load_shard_schema_mapping( &self, identifier: &TableIdentifier, db_id: &str, catalog_schema_id: CatalogSchemaId, ) -> CatalogResult<ShardSchemaMapping>
Load the core schema id used for one table schema on a shard.
Trait Implementations§
Source§impl Catalog for FileCatalog
impl Catalog for FileCatalog
fn create_namespace(&self, namespace: Vec<String>) -> CatalogResult<()>
fn list_namespaces(&self) -> CatalogResult<Vec<Vec<String>>>
fn drop_namespace(&self, namespace: &[String]) -> CatalogResult<()>
fn create_table( &self, identifier: TableIdentifier, schema: TableSchema, ) -> CatalogResult<CatalogTable>
fn load_table( &self, identifier: &TableIdentifier, ) -> CatalogResult<CatalogTable>
fn load_table_schema( &self, identifier: &TableIdentifier, catalog_schema_id: CatalogSchemaId, ) -> CatalogResult<TableSchema>
fn evolve_schema( &self, identifier: &TableIdentifier, changes: Vec<SchemaChange>, ) -> CatalogResult<CatalogTable>
fn list_tables( &self, namespace: &[String], ) -> CatalogResult<Vec<TableIdentifier>>
fn table_exists(&self, identifier: &TableIdentifier) -> CatalogResult<bool>
fn rename_table( &self, identifier: &TableIdentifier, new_name: String, ) -> CatalogResult<CatalogTable>
fn drop_table(&self, identifier: &TableIdentifier) -> CatalogResult<()>
Auto Trait Implementations§
impl !Freeze for FileCatalog
impl !RefUnwindSafe for FileCatalog
impl !UnwindSafe for FileCatalog
impl Send for FileCatalog
impl Sync for FileCatalog
impl Unpin for FileCatalog
impl UnsafeUnpin for FileCatalog
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more