pub struct Column {
pub name: CompactString,
pub description: Option<String>,
pub nullable: bool,
pub data_type: CompactString,
pub nominal_type: CompactString,
pub max_length: Option<i32>,
pub default: Option<String>,
pub enum_values: SmallVec<[String; 8]>,
pub is_composite: bool,
pub composite_type_schema: Option<CompactString>,
pub composite_type_name: Option<CompactString>,
}Expand description
Column metadata
Represents a PostgreSQL column with its type and constraints.
Fields§
§name: CompactStringColumn name
description: Option<String>Description from pg_description
nullable: boolWhether NULL values are allowed
data_type: CompactStringThe “coerced” data type (e.g., “character varying” instead of “varchar”)
nominal_type: CompactStringThe actual declared type as written
max_length: Option<i32>Maximum length for character types
default: Option<String>Default value expression
enum_values: SmallVec<[String; 8]>Enum values if this is an enum type
is_composite: boolWhether this is a composite type
composite_type_schema: Option<CompactString>Composite type schema (if composite)
composite_type_name: Option<CompactString>Composite type name (if composite)
Implementations§
Source§impl Column
impl Column
Sourcepub fn has_default(&self) -> bool
pub fn has_default(&self) -> bool
Check if the column has a default value
Sourcepub fn is_generated(&self) -> bool
pub fn is_generated(&self) -> bool
Check if this is an auto-generated column (serial, identity, generated)
Sourcepub fn is_text_type(&self) -> bool
pub fn is_text_type(&self) -> bool
Check if this is a text/character type
Sourcepub fn is_numeric_type(&self) -> bool
pub fn is_numeric_type(&self) -> bool
Check if this is a numeric type
Sourcepub fn is_boolean_type(&self) -> bool
pub fn is_boolean_type(&self) -> bool
Check if this is a boolean type
Sourcepub fn is_json_type(&self) -> bool
pub fn is_json_type(&self) -> bool
Check if this is a JSON type
Sourcepub fn is_array_type(&self) -> bool
pub fn is_array_type(&self) -> bool
Check if this is an array type
Sourcepub fn is_temporal_type(&self) -> bool
pub fn is_temporal_type(&self) -> bool
Check if this is a timestamp/date type
Sourcepub fn is_uuid_type(&self) -> bool
pub fn is_uuid_type(&self) -> bool
Check if this is a UUID type
Sourcepub fn is_composite_type(&self) -> bool
pub fn is_composite_type(&self) -> bool
Check if this is a composite type