Skip to main content

TableDefinition

Struct TableDefinition 

Source
pub struct TableDefinition<S> {
Show 22 fields pub name: String, pub columns: Vec<Column<S>>, pub indexes: Vec<Index>, pub foreign_keys: Vec<ForeignKey>, pub drop_columns: Vec<String>, pub rename_columns: Vec<RenameColumn>, pub drop_indexes: Vec<String>, pub drop_foreign_keys: Vec<String>, pub raw_column_defs: Vec<String>, pub raw_index_defs: Vec<String>, pub checks: Vec<CheckConstraint>, pub composite_primary_key: Vec<String>, pub order_by: Vec<String>, pub partition_type: Option<PartitionType>, pub partition_expression: String, pub partition_count: Option<i64>, pub engine: Option<Engine>, pub engine_args: Vec<String>, pub ttl: Option<String>, pub settings: Vec<(String, String)>, pub sample_by: Option<String>, pub order_by_raw: Option<String>,
}
Expand description

Everything a table blueprint holds: added columns, indexes, keys, and the alterations, partitioning and engine options set on it.

PHP: the public properties of Utopia\Query\Schema\Table.

Fields§

§name: String

The table name.

§columns: Vec<Column<S>>

The columns to add (or modify).

§indexes: Vec<Index>

The indexes to add.

§foreign_keys: Vec<ForeignKey>

The foreign keys to add.

§drop_columns: Vec<String>

The columns to drop.

§rename_columns: Vec<RenameColumn>

The columns to rename.

§drop_indexes: Vec<String>

The indexes to drop.

§drop_foreign_keys: Vec<String>

The foreign keys to drop.

§raw_column_defs: Vec<String>

Raw column definitions.

§raw_index_defs: Vec<String>

Raw index definitions.

§checks: Vec<CheckConstraint>

Named CHECK constraints.

§composite_primary_key: Vec<String>

The columns of a composite primary key.

§order_by: Vec<String>

The ClickHouse ORDER BY columns.

§partition_type: Option<PartitionType>

How the table is partitioned.

§partition_expression: String

The partition expression.

§partition_count: Option<i64>

The number of partitions (PARTITIONS n).

§engine: Option<Engine>

The ClickHouse engine.

§engine_args: Vec<String>

The engine’s arguments.

§ttl: Option<String>

The ClickHouse table TTL.

§settings: Vec<(String, String)>

The ClickHouse SETTINGS, rendered.

§sample_by: Option<String>

The ClickHouse SAMPLE BY expression.

§order_by_raw: Option<String>

A raw ClickHouse ORDER BY expression.

Trait Implementations§

Source§

impl<S> Clone for TableDefinition<S>

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<S> Debug for TableDefinition<S>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<S> Forget for TableDefinition<S>

§

impl<S> Freeze for TableDefinition<S>

§

impl<S> Move for TableDefinition<S>

§

impl<S> RefUnwindSafe for TableDefinition<S>

§

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

§

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

§

impl<S> Unpin for TableDefinition<S>
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<S> UnsafeUnpin for TableDefinition<S>

§

impl<S> UnwindSafe for TableDefinition<S>
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.