Struct spacetimedb_sats::db::def::ColumnSchema
source · pub struct ColumnSchema {
pub table_id: TableId,
pub col_pos: ColId,
pub col_name: String,
pub col_type: AlgebraicType,
}
Expand description
A struct representing the schema of a database column.
Fields§
§table_id: TableId
§col_pos: ColId
Position of the column within the table.
col_name: String
§col_type: AlgebraicType
Implementations§
source§impl ColumnSchema
impl ColumnSchema
sourcepub fn from_def(table_id: TableId, col_pos: ColId, column: ColumnDef) -> Self
pub fn from_def(table_id: TableId, col_pos: ColId, column: ColumnDef) -> Self
Constructs a ColumnSchema from a given ColumnDef and table_id
.
§Arguments
table_id
: Identifier of the table to which the column belongs.col_pos
: Position of the column within the table.column
: TheColumnDef
containing column information.
Trait Implementations§
source§impl Clone for ColumnSchema
impl Clone for ColumnSchema
source§fn clone(&self) -> ColumnSchema
fn clone(&self) -> ColumnSchema
Returns a copy 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 ColumnSchema
impl Debug for ColumnSchema
source§impl From<&ColumnSchema> for ProductTypeElement
impl From<&ColumnSchema> for ProductTypeElement
source§fn from(value: &ColumnSchema) -> Self
fn from(value: &ColumnSchema) -> Self
Converts to this type from the input type.
source§impl From<ColumnSchema> for ColumnDef
impl From<ColumnSchema> for ColumnDef
source§fn from(value: ColumnSchema) -> Self
fn from(value: ColumnSchema) -> Self
Converts to this type from the input type.
source§impl Ord for ColumnSchema
impl Ord for ColumnSchema
source§fn cmp(&self, other: &ColumnSchema) -> Ordering
fn cmp(&self, other: &ColumnSchema) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for ColumnSchema
impl PartialEq for ColumnSchema
source§fn eq(&self, other: &ColumnSchema) -> bool
fn eq(&self, other: &ColumnSchema) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for ColumnSchema
impl PartialOrd for ColumnSchema
source§fn partial_cmp(&self, other: &ColumnSchema) -> Option<Ordering>
fn partial_cmp(&self, other: &ColumnSchema) -> Option<Ordering>
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 moreimpl Eq for ColumnSchema
impl StructuralPartialEq for ColumnSchema
Auto Trait Implementations§
impl RefUnwindSafe for ColumnSchema
impl Send for ColumnSchema
impl Sync for ColumnSchema
impl Unpin for ColumnSchema
impl UnwindSafe for ColumnSchema
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