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: StringThe name.
kind: ColumnTypeThe portable type.
length: Option<i64>The length (strings).
precision: Option<i64>The precision (decimals, date-times).
scale: Option<i64>The scale (decimals).
nullable: boolWhether 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: boolWhether the column is unsigned.
unique: boolWhether the column is unique.
primary: boolWhether the column is (part of) the primary key.
auto_increment: boolWhether 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: boolWhether 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: boolWhether 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).