pub struct Table {
pub id: TableId,
pub name: String,
pub columns: Vec<Column>,
pub primary_key: PrimaryKey,
pub indices: Vec<Index>,
}Expand description
A database table
Fields§
§id: TableIdUniquely identifies a table
name: StringName of the table
columns: Vec<Column>The table’s columns
primary_key: PrimaryKey§indices: Vec<Index>Implementations§
Source§impl Table
impl Table
pub fn primary_key_column(&self, i: usize) -> &Column
pub fn primary_key_columns(&self) -> impl ExactSizeIterator<Item = &Column> + '_
pub fn column(&self, id: impl Into<ColumnId>) -> &Column
Sourcepub fn resolve(&self, projection: &Projection) -> &Column
pub fn resolve(&self, projection: &Projection) -> &Column
The path must have exactly one step
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<'a, T> IntoExprTarget<'a, T> for &'a Table
impl<'a, T> IntoExprTarget<'a, T> for &'a Table
fn into_expr_target(self, _schema: &'a T) -> ExprTarget<'a>
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