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: StringThe 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: StringThe 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.