pub struct InMemoryCatalog { /* private fields */ }Expand description
An in-memory catalog implementation for testing and development.
This implementation stores all metadata in memory and is not persistent. It’s useful for unit tests and local development.
Implementations§
Trait Implementations§
Source§impl Catalog for InMemoryCatalog
impl Catalog for InMemoryCatalog
Source§fn list_namespaces<'life0, 'life1, 'async_trait>(
&'life0 self,
parent: Option<&'life1 [String]>,
) -> Pin<Box<dyn Future<Output = CatalogResult<Vec<Vec<String>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_namespaces<'life0, 'life1, 'async_trait>(
&'life0 self,
parent: Option<&'life1 [String]>,
) -> Pin<Box<dyn Future<Output = CatalogResult<Vec<Vec<String>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Lists all namespaces, optionally under a parent namespace.
Source§fn create_namespace<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 [String],
properties: NamespaceProperties,
) -> Pin<Box<dyn Future<Output = CatalogResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_namespace<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 [String],
properties: NamespaceProperties,
) -> Pin<Box<dyn Future<Output = CatalogResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Creates a new namespace.
Source§fn drop_namespace<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 [String],
) -> Pin<Box<dyn Future<Output = CatalogResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn drop_namespace<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 [String],
) -> Pin<Box<dyn Future<Output = CatalogResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Drops a namespace (must be empty).
Source§fn namespace_properties<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 [String],
) -> Pin<Box<dyn Future<Output = CatalogResult<NamespaceProperties>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn namespace_properties<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 [String],
) -> Pin<Box<dyn Future<Output = CatalogResult<NamespaceProperties>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Gets namespace properties.
Source§fn list_tables<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 [String],
) -> Pin<Box<dyn Future<Output = CatalogResult<Vec<TableIdentifier>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_tables<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 [String],
) -> Pin<Box<dyn Future<Output = CatalogResult<Vec<TableIdentifier>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Lists all tables in a namespace.
Source§fn create_table<'life0, 'life1, 'async_trait>(
&'life0 self,
identifier: &'life1 TableIdentifier,
metadata: TableMetadata,
) -> Pin<Box<dyn Future<Output = CatalogResult<TableMetadata>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_table<'life0, 'life1, 'async_trait>(
&'life0 self,
identifier: &'life1 TableIdentifier,
metadata: TableMetadata,
) -> Pin<Box<dyn Future<Output = CatalogResult<TableMetadata>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Creates a new table.
Source§fn load_table<'life0, 'life1, 'async_trait>(
&'life0 self,
identifier: &'life1 TableIdentifier,
) -> Pin<Box<dyn Future<Output = CatalogResult<TableMetadata>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_table<'life0, 'life1, 'async_trait>(
&'life0 self,
identifier: &'life1 TableIdentifier,
) -> Pin<Box<dyn Future<Output = CatalogResult<TableMetadata>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Loads a table’s metadata.
Source§fn drop_table<'life0, 'life1, 'async_trait>(
&'life0 self,
identifier: &'life1 TableIdentifier,
_purge: bool,
) -> Pin<Box<dyn Future<Output = CatalogResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn drop_table<'life0, 'life1, 'async_trait>(
&'life0 self,
identifier: &'life1 TableIdentifier,
_purge: bool,
) -> Pin<Box<dyn Future<Output = CatalogResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Drops a table.
Source§fn rename_table<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
from: &'life1 TableIdentifier,
to: &'life2 TableIdentifier,
) -> Pin<Box<dyn Future<Output = CatalogResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn rename_table<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
from: &'life1 TableIdentifier,
to: &'life2 TableIdentifier,
) -> Pin<Box<dyn Future<Output = CatalogResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Renames a table.
Source§fn table_exists<'life0, 'life1, 'async_trait>(
&'life0 self,
identifier: &'life1 TableIdentifier,
) -> Pin<Box<dyn Future<Output = CatalogResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn table_exists<'life0, 'life1, 'async_trait>(
&'life0 self,
identifier: &'life1 TableIdentifier,
) -> Pin<Box<dyn Future<Output = CatalogResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Checks if a table exists.
Source§fn commit_table<'life0, 'life1, 'async_trait>(
&'life0 self,
identifier: &'life1 TableIdentifier,
base_version: i64,
metadata: TableMetadata,
) -> Pin<Box<dyn Future<Output = CatalogResult<TableMetadata>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn commit_table<'life0, 'life1, 'async_trait>(
&'life0 self,
identifier: &'life1 TableIdentifier,
base_version: i64,
metadata: TableMetadata,
) -> Pin<Box<dyn Future<Output = CatalogResult<TableMetadata>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Atomically updates table metadata using compare-and-swap. Read more
Auto Trait Implementations§
impl !Freeze for InMemoryCatalog
impl !RefUnwindSafe for InMemoryCatalog
impl Send for InMemoryCatalog
impl Sync for InMemoryCatalog
impl Unpin for InMemoryCatalog
impl !UnwindSafe for InMemoryCatalog
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
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