pub struct IndexColumn {
pub column: ColumnId,
pub op: IndexOp,
pub scope: IndexScope,
}Expand description
A single column entry within an Index.
Specifies which column is indexed, the comparison operation, and the scope (partition vs. local).
§Examples
ⓘ
use toasty_core::schema::db::{IndexColumn, IndexOp, IndexScope, ColumnId, TableId};
let ic = IndexColumn {
column: ColumnId { table: TableId(0), index: 0 },
op: IndexOp::Eq,
scope: IndexScope::Local,
};
assert!(ic.scope.is_local());Fields§
§column: ColumnIdThe column being indexed
op: IndexOpThe comparison operation used to index the column
scope: IndexScopeScope of the index
Implementations§
Source§impl IndexColumn
impl IndexColumn
Sourcepub fn table_column<'a>(&self, schema: &'a Schema) -> &'a Column
pub fn table_column<'a>(&self, schema: &'a Schema) -> &'a Column
Returns the Column referenced by this index column.
Trait Implementations§
Source§impl Clone for IndexColumn
impl Clone for IndexColumn
Source§fn clone(&self) -> IndexColumn
fn clone(&self) -> IndexColumn
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IndexColumn
impl Debug for IndexColumn
Source§impl<'de> Deserialize<'de> for IndexColumn
impl<'de> Deserialize<'de> for IndexColumn
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
Auto Trait Implementations§
impl Freeze for IndexColumn
impl RefUnwindSafe for IndexColumn
impl Send for IndexColumn
impl Sync for IndexColumn
impl Unpin for IndexColumn
impl UnwindSafe for IndexColumn
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