Struct delta_sharing_server::protocol::securable::Schema
source · pub struct Schema { /* private fields */ }Expand description
The type of a schema as defined in the Delta Sharing protocol.
A schema is a logical grouping of tables. A schema may contain multiple
tables. A schema is defined within the context of a Share.
Implementations§
source§impl Schema
impl Schema
Returns the name of the share associated with self
Example
use delta_sharing_server::protocol::securable::{ShareBuilder, SchemaBuilder};
let share = ShareBuilder::new("my-share").build();
let schema = SchemaBuilder::new(share, "my-schema").build();
assert_eq!(schema.share_name(), "my-share");Returns the id of the share associated with self
Example
use delta_sharing_server::protocol::securable::{ShareBuilder, SchemaBuilder};
let share = ShareBuilder::new("my-share").id("my-share-id").build();
let schema = SchemaBuilder::new(share, "my-schema").build();
assert_eq!(schema.share_id(), Some("my-share-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};
let share = ShareBuilder::new("my-share").build();
let schema = SchemaBuilder::new(share, "my-schema").build();
assert_eq!(schema.name(), "my-schema");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};
let share = ShareBuilder::new("my-share").build();
let schema = SchemaBuilder::new(share, "my-schema").id("my-schema-id").build();
assert_eq!(schema.id(), Some("my-schema-id"));Trait Implementations§
source§impl<'de> Deserialize<'de> for Schema
impl<'de> Deserialize<'de> for Schema
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<Schema> for Schema
impl PartialEq<Schema> for Schema
source§impl PartialOrd<Schema> for Schema
impl PartialOrd<Schema> for Schema
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 Schema
impl TryFrom<&HashMap<String, AttributeValue, RandomState>> for Schema
impl Eq for Schema
impl StructuralEq for Schema
impl StructuralPartialEq for Schema
Auto Trait Implementations§
impl RefUnwindSafe for Schema
impl Send for Schema
impl Sync for Schema
impl Unpin for Schema
impl UnwindSafe for Schema
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.