pub struct Column {Show 18 fields
pub id: u32,
pub name: String,
pub storage_type: ColumnType,
pub application_type: ColumnType,
pub nullable: bool,
pub primary_key: bool,
pub default: Option<DefaultKind>,
pub generated: bool,
pub enum_values: Option<Vec<String>>,
pub min: Option<f64>,
pub max: Option<f64>,
pub min_length: Option<usize>,
pub max_length: Option<usize>,
pub regex: Option<String>,
pub check_expr: Option<String>,
pub embedding_dim: Option<u32>,
pub encrypted: bool,
pub encrypted_indexable: bool,
}Expand description
A column definition.
Fields§
§id: u32Stable column identifier. IDs must be unique within a table.
name: StringLogical column name.
storage_type: ColumnTypePhysical storage type.
application_type: ColumnTypeApplication-facing type (often the same as storage_type).
nullable: boolWhether the column may contain null.
primary_key: boolWhether this column is part of the primary key.
default: Option<DefaultKind>Optional default value generator.
generated: boolWhether the value is generated on every mutation.
enum_values: Option<Vec<String>>Permitted string values, if any.
min: Option<f64>Minimum numeric value.
max: Option<f64>Maximum numeric value.
min_length: Option<usize>Minimum string/bytes length.
max_length: Option<usize>Maximum string/bytes length.
regex: Option<String>Regular expression a text value must match, stored as its source pattern.
check_expr: Option<String>An optional check expression name for runtime evaluation.
embedding_dim: Option<u32>Vector dimension for an Embedding column (required for ANN).
encrypted: boolEncrypt this column’s page payload at rest (requires an encrypted db).
encrypted_indexable: boolEncrypt the column but keep it queryable via deterministic equality tokens / order-preserving encoding (requires an encrypted db).
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Column
impl<'de> Deserialize<'de> for Column
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Column, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Column, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for Column
impl Serialize for Column
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for Column
Auto Trait Implementations§
impl Freeze for Column
impl RefUnwindSafe for Column
impl Send for Column
impl Sync for Column
impl Unpin for Column
impl UnsafeUnpin for Column
impl UnwindSafe for Column
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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