Enum TabularMetadataRef

Source
pub enum TabularMetadataRef<'a> {
    Table(&'a TableMetadata),
    View(&'a ViewMetadata),
    MaterializedView(&'a MaterializedViewMetadata),
}
Expand description

A reference wrapper for different types of tabular metadata

This enum provides a way to reference the different types of tabular metadata (tables, views, materialized views) without taking ownership. It implements common functionality for accessing metadata properties across all tabular types.

Variants§

§

Table(&'a TableMetadata)

Table metadata

§

View(&'a ViewMetadata)

View metadata

§

MaterializedView(&'a MaterializedViewMetadata)

Materialized view metadata

Implementations§

Source§

impl TabularMetadataRef<'_>

Source

pub fn uuid(&self) -> &Uuid

Returns the UUID of the tabular object

§Returns
  • A reference to the UUID that uniquely identifies this table, view, or materialized view
Source

pub fn location(&self) -> &str

Returns the storage location of the tabular object

§Returns
  • A string reference to the base storage location (e.g. S3 path, file path) where this table, view, or materialized view’s data is stored
Source

pub fn sequence_number(&self) -> i64

Returns the current sequence number or version ID of the tabular object

§Returns
  • For tables: The last sequence number used to create a snapshot
  • For views and materialized views: The current version ID
Source

pub fn current_schema(&self, branch: Option<&str>) -> Result<&Schema, Error>

Returns the current schema for the tabular object

§Arguments
  • branch - Optional branch name to get schema from
§Returns
  • Ok(&Schema) - The current schema for this table, view, or materialized view
  • Err(Error) - If the schema cannot be retrieved

Trait Implementations§

Source§

impl<'a> From<&'a GeneralViewMetadata<FullIdentifier>> for TabularMetadataRef<'a>

Source§

fn from(value: &'a MaterializedViewMetadata) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a GeneralViewMetadata<Option<()>>> for TabularMetadataRef<'a>

Source§

fn from(value: &'a ViewMetadata) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a TableMetadata> for TabularMetadataRef<'a>

Source§

fn from(value: &'a TableMetadata) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a TabularMetadata> for TabularMetadataRef<'a>

Source§

fn from(value: &'a TabularMetadata) -> Self

Converts to this type from the input type.
Source§

impl<'a> Serialize for TabularMetadataRef<'a>

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for TabularMetadataRef<'a>

§

impl<'a> RefUnwindSafe for TabularMetadataRef<'a>

§

impl<'a> Send for TabularMetadataRef<'a>

§

impl<'a> Sync for TabularMetadataRef<'a>

§

impl<'a> Unpin for TabularMetadataRef<'a>

§

impl<'a> UnwindSafe for TabularMetadataRef<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T