Struct delta_sharing_server::protocol::securable::Table
source · 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
Returns the name of the share associated with self
Example
use delta_sharing_server::protocol::securable::{ShareBuilder, SchemaBuilder, TableBuilder};
let share = ShareBuilder::new("my-share").build();
let schema = SchemaBuilder::new(share, "my-schema").build();
let table = TableBuilder::new(schema, "my-table", "my-storage-path").build();
assert_eq!(table.share_name(), "my-share");Returns the id of the share associated with self
Example
use delta_sharing_server::protocol::securable::{ShareBuilder, SchemaBuilder, TableBuilder};
let share = ShareBuilder::new("my-share").id("my-share-id").build();
let schema = SchemaBuilder::new(share, "my-schema").build();
let table = TableBuilder::new(schema, "my-table", "my-storage-path").build();
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 delta_sharing_server::protocol::securable::{ShareBuilder, SchemaBuilder, TableBuilder};
let share = ShareBuilder::new("my-share").build();
let schema = SchemaBuilder::new(share, "my-schema").build();
let table = TableBuilder::new(schema, "my-table", "my-storage-path").build();
assert_eq!(table.schema_name(), "my-schema");sourcepub fn schema_id(&self) -> Option<&str>
pub fn schema_id(&self) -> Option<&str>
Returns the id of the schema associated with self
Example
use delta_sharing_server::protocol::securable::{ShareBuilder, SchemaBuilder, TableBuilder};
let share = ShareBuilder::new("my-share").build();
let schema = SchemaBuilder::new(share, "my-schema").id("my-schema-id").build();
let table = TableBuilder::new(schema, "my-table", "my-storage-path").build();
assert_eq!(table.schema_id(), Some("my-schema-id"));sourcepub fn name(&self) -> &str
pub fn name(&self) -> &str
Returns the name of self
Example
use delta_sharing_server::protocol::securable::{ShareBuilder, SchemaBuilder, TableBuilder};
let share = ShareBuilder::new("my-share").build();
let schema = SchemaBuilder::new(share, "my-schema").build();
let table = TableBuilder::new(schema, "my-table", "my-storage-path").build();
assert_eq!(table.name(), "my-table");sourcepub fn id(&self) -> Option<&str>
pub fn id(&self) -> Option<&str>
Returns the id of self
Example
use delta_sharing_server::protocol::securable::{ShareBuilder, SchemaBuilder, TableBuilder};
let share = ShareBuilder::new("my-share").build();
let schema = SchemaBuilder::new(share, "my-schema").build();
let table = TableBuilder::new(schema, "my-table", "my-storage-path").id("my-table-id").build();
assert_eq!(table.id(), Some("my-table-id"));sourcepub fn storage_path(&self) -> &str
pub fn storage_path(&self) -> &str
Returns the storage path of self
Example
use delta_sharing_server::protocol::securable::{ShareBuilder, SchemaBuilder, TableBuilder};
let share = ShareBuilder::new("my-share").build();
let schema = SchemaBuilder::new(share, "my-schema").build();
let table = TableBuilder::new(schema, "my-table", "my-storage-path").build();
assert_eq!(table.storage_path(), "my-storage-path");sourcepub fn format(&self) -> &str
pub fn format(&self) -> &str
Returns the format of self
Example
use delta_sharing_server::protocol::securable::{ShareBuilder, SchemaBuilder, TableBuilder};
let share = ShareBuilder::new("my-share").build();
let schema = SchemaBuilder::new(share, "my-schema").build();
let table = TableBuilder::new(schema, "my-table", "my-storage-path").format("PARQUET").build();
assert_eq!(table.format(), "PARQUET");
let share = ShareBuilder::new("my-share").build();
let schema = SchemaBuilder::new(share, "my-schema").build();
let table = TableBuilder::new(schema, "my-table", "my-storage-path").build();
assert_eq!(table.format(), "DELTA");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
source§impl PartialEq<Table> for Table
impl PartialEq<Table> for Table
source§impl PartialOrd<Table> for Table
impl PartialOrd<Table> for Table
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl TryFrom<&HashMap<String, AttributeValue, RandomState>> for Table
impl TryFrom<&HashMap<String, AttributeValue, RandomState>> for Table
impl Eq for Table
impl StructuralEq for Table
impl StructuralPartialEq for Table
Auto Trait Implementations§
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.