pub struct Table { /* private fields */ }Expand description
The type of a table as defined in the Delta Sharing protocol.
A table is a Delta Lake table or a view on top of a Delta Lake table. A
table is defined within the context of a Schema.
Implementations§
Source§impl Table
impl Table
Sourcepub fn new(
share_name: impl Into<String>,
schema_name: impl Into<String>,
table_name: impl Into<String>,
share_id: Option<String>,
table_id: Option<String>,
) -> Self
pub fn new( share_name: impl Into<String>, schema_name: impl Into<String>, table_name: impl Into<String>, share_id: Option<String>, table_id: Option<String>, ) -> Self
Create a new Table with the given Schema, name, storage_path,
table_id and table_format. Whenever the table_id is None, it
will default to DELTA
Returns the name of the share associated with self
§Example
use datafusion_delta_sharing::securable::{Share, Schema, Table};
let table = Table::new("my-share", "my-schema", "my-table", None, None);
assert_eq!(table.share_name(), "my-share");Returns the id of the share associated with self
§Example
use datafusion_delta_sharing::securable::{Share, Schema, Table};
let table = Table::new("my-share", "my-schema", "my-table", Some("my-share-id".to_string()), None);
assert_eq!(table.share_id(), Some("my-share-id"));Sourcepub fn schema_name(&self) -> &str
pub fn schema_name(&self) -> &str
Returns the name of the schema associated with self
§Example
use datafusion_delta_sharing::securable::{Share, Schema, Table};
let table = Table::new("my-share", "my-schema", "my-table", None, None);
assert_eq!(table.schema_name(), "my-schema");Trait Implementations§
Source§impl<'de> Deserialize<'de> for Table
impl<'de> Deserialize<'de> for Table
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Table
impl StructuralPartialEq for Table
Auto Trait Implementations§
impl Freeze for Table
impl RefUnwindSafe for Table
impl Send for Table
impl Sync for Table
impl Unpin for Table
impl UnwindSafe for Table
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.