Skip to main content

ColumnDefinition

Struct ColumnDefinition 

Source
pub struct ColumnDefinition {
Show 29 fields pub name: String, pub kind: ColumnType, pub length: Option<i64>, pub precision: Option<i64>, pub scale: Option<i64>, pub nullable: bool, pub default: Option<Value>, pub default_raw: Option<String>, pub unsigned: bool, pub unique: bool, pub primary: bool, pub auto_increment: bool, pub after: Option<String>, pub comment: Option<String>, pub enum_values: Vec<String>, pub srid: Option<i64>, pub dimensions: Option<i64>, pub modify: bool, pub collation: Option<String>, pub check: Option<String>, pub generated_expression: Option<String>, pub generated_stored: Option<bool>, pub ttl: Option<String>, pub user_type: Option<String>, pub low_cardinality: bool, pub fixed_string_length: Option<i64>, pub codecs: Vec<String>, pub array_element_type: Option<ColumnType>, pub tuple_element_types: Vec<ColumnType>,
}
Expand description

What a column is: its name, type, sizes and every modifier set on it.

PHP: the public properties of Utopia\Query\Schema\Column (and Column\ClickHouse).

Fields§

§name: String

The name.

§kind: ColumnType

The portable type.

§length: Option<i64>

The length (strings).

§precision: Option<i64>

The precision (decimals, date-times).

§scale: Option<i64>

The scale (decimals).

§nullable: bool

Whether the column accepts NULL.

§default: Option<Value>

The default value, rendered as a literal (Some(Value::Null) is DEFAULT NULL; None is no default).

§default_raw: Option<String>

A raw default expression, emitted verbatim.

§unsigned: bool

Whether the column is unsigned.

§unique: bool

Whether the column is unique.

§primary: bool

Whether the column is (part of) the primary key.

§auto_increment: bool

Whether the server increments the column.

§after: Option<String>

The column this one is placed after (MySQL ALTER).

§comment: Option<String>

The comment.

§enum_values: Vec<String>

The allowed values of an enum column.

§srid: Option<i64>

The spatial reference system of a geometry column.

§dimensions: Option<i64>

The width of a vector column.

§modify: bool

Whether an ALTER modifies the column instead of adding it.

§collation: Option<String>

The collation.

§check: Option<String>

A column-level CHECK expression.

§generated_expression: Option<String>

The expression of a generated column.

§generated_stored: Option<bool>

Whether a generated column is stored (Some(true)) or virtual (Some(false)); None when not set.

§ttl: Option<String>

A column-level TTL expression (ClickHouse).

§user_type: Option<String>

A user-defined type name (PostgreSQL).

§low_cardinality: bool

Whether the type is wrapped in LowCardinality(...) (ClickHouse).

§fixed_string_length: Option<i64>

The width of a FixedString(N) column (ClickHouse).

§codecs: Vec<String>

The CODEC(...) clauses (ClickHouse).

§array_element_type: Option<ColumnType>

The element type of an Array(T) column (ClickHouse).

§tuple_element_types: Vec<ColumnType>

The element types of a Tuple(...) column (ClickHouse).

Trait Implementations§

Source§

impl Clone for ColumnDefinition

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ColumnDefinition

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for ColumnDefinition

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ColumnDefinition

Auto Trait Implementations§

§

impl !Freeze for ColumnDefinition

§

impl Forget for ColumnDefinition

§

impl Move for ColumnDefinition

§

impl RefUnwindSafe for ColumnDefinition

§

impl Send for ColumnDefinition
where RawVecInner: Send, &'static [u8]: Send, Bytes: Send, Arc<Repr<Object>>: Send, BoxRaw<Query>: Send,

§

impl Sync for ColumnDefinition
where RawVecInner: Sync, Bytes: Sync, Arc<Repr<Object>>: Sync, BoxRaw<Query>: Sync,

§

impl Unpin for ColumnDefinition
where *const u8 is !null: Unpin, &'static [u8]: Unpin, *const u8: Unpin, Align8<*mut ()>: Unpin, &'static Vtable: Unpin, Arc<Repr<Object>>: Unpin, Box<Query>: Unpin,

§

impl UnsafeUnpin for ColumnDefinition

§

impl UnwindSafe for ColumnDefinition
where RawVecInner: UnwindSafe, &'static [u8]: UnwindSafe, *const u8: UnwindSafe, Align8<*mut ()>: UnwindSafe, &'static Vtable: UnwindSafe, Arc<Repr<Object>>: UnwindSafe, BoxRaw<Query>: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.