pub struct DataColumn {
pub name: String,
pub data_type: DataType,
pub nullable: bool,
pub unique_values: Option<usize>,
pub null_count: usize,
pub metadata: HashMap<String, String>,
pub qualified_name: Option<String>,
pub source_table: Option<String>,
}
Expand description
Column metadata and definition
Fields§
§name: String
§data_type: DataType
§nullable: bool
§unique_values: Option<usize>
§null_count: usize
§metadata: HashMap<String, String>
§qualified_name: Option<String>
Qualified name with table prefix (e.g., “messages.field_name”)
source_table: Option<String>
Source table or CTE name
Implementations§
Source§impl DataColumn
impl DataColumn
pub fn new(name: impl Into<String>) -> Self
pub fn with_type(self, data_type: DataType) -> Self
Sourcepub fn with_qualified_name(self, table_name: &str) -> Self
pub fn with_qualified_name(self, table_name: &str) -> Self
Set the qualified name (table.column format)
Sourcepub fn get_qualified_or_simple_name(&self) -> &str
pub fn get_qualified_or_simple_name(&self) -> &str
Get the qualified name if available, otherwise return the simple name
pub fn with_nullable(self, nullable: bool) -> Self
Trait Implementations§
Source§impl Clone for DataColumn
impl Clone for DataColumn
Source§fn clone(&self) -> DataColumn
fn clone(&self) -> DataColumn
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for DataColumn
impl Debug for DataColumn
Source§impl<'de> Deserialize<'de> for DataColumn
impl<'de> Deserialize<'de> for DataColumn
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for DataColumn
impl RefUnwindSafe for DataColumn
impl Send for DataColumn
impl Sync for DataColumn
impl Unpin for DataColumn
impl UnwindSafe for DataColumn
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more