pub struct TableOrViewSchema {
pub table_id: TableId,
pub view_info: Option<ViewDefInfo>,
pub table_name: TableName,
pub table_access: StAccess,
/* private fields */
}Expand description
A wrapper around a TableSchema for views.
Fields§
§table_id: TableId§view_info: Option<ViewDefInfo>§table_name: TableName§table_access: StAccessImplementations§
Source§impl TableOrViewSchema
impl TableOrViewSchema
Sourcepub fn is_anonymous_view(&self) -> bool
pub fn is_anonymous_view(&self) -> bool
Is this schema that of an anonymous view?
Sourcepub fn inner(&self) -> Arc<TableSchema>
pub fn inner(&self) -> Arc<TableSchema>
Returns the TableSchema of the underlying datastore table.
For views, this schema will include the internal sender and arg_id columns.
Sourcepub fn public_columns(&self) -> &[ColumnSchema]
pub fn public_columns(&self) -> &[ColumnSchema]
Returns the public columns of this table.
The ColIds in this list do not necessarily correspond to their position in this list.
Rather they correspond to the position of the column in the physical datastore table.
This is important since this method may not return all columns recorded in the datastore.
For views in particular it will not include the internal sender and arg_id columns.
Hence columns in this list should be looked up by their ColId - not their position.
Sourcepub fn get_column_by_name(&self, col_name: &str) -> Option<&ColumnSchema>
pub fn get_column_by_name(&self, col_name: &str) -> Option<&ColumnSchema>
Check if the col_name exist on this TableOrViewSchema
Sourcepub fn get_column_by_name_or_alias(
&self,
col_name: &str,
) -> Option<&ColumnSchema>
pub fn get_column_by_name_or_alias( &self, col_name: &str, ) -> Option<&ColumnSchema>
Check if the col_name exists on this TableOrViewSchema, prioritizing alias over canonical name.
Trait Implementations§
Source§impl Clone for TableOrViewSchema
impl Clone for TableOrViewSchema
Source§fn clone(&self) -> TableOrViewSchema
fn clone(&self) -> TableOrViewSchema
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TableOrViewSchema
impl Debug for TableOrViewSchema
Source§impl From<Arc<TableSchema>> for TableOrViewSchema
impl From<Arc<TableSchema>> for TableOrViewSchema
Source§fn from(inner: Arc<TableSchema>) -> Self
fn from(inner: Arc<TableSchema>) -> Self
Source§impl PartialEq for TableOrViewSchema
impl PartialEq for TableOrViewSchema
impl Eq for TableOrViewSchema
impl StructuralPartialEq for TableOrViewSchema
Auto Trait Implementations§
impl Freeze for TableOrViewSchema
impl RefUnwindSafe for TableOrViewSchema
impl Send for TableOrViewSchema
impl Sync for TableOrViewSchema
impl Unpin for TableOrViewSchema
impl UnsafeUnpin for TableOrViewSchema
impl UnwindSafe for TableOrViewSchema
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
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>
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