pub struct ColumnSpec {
pub name: String,
pub ty: ProtoFieldType,
pub nullable: bool,
pub comment: Option<Comment>,
}Expand description
A single column in a desired or live table schema.
Fields§
§name: StringColumn name (verbatim; quoting applied at DDL-emit time).
ty: ProtoFieldTypeCoarse sink-direction type (the 7-variant vocabulary that maps cleanly to Delta / Unity Catalog type names and carries widening rules).
nullable: boolWhether the column admits NULL.
comment: Option<Comment>Optional description and its authority.
Implementations§
Source§impl ColumnSpec
impl ColumnSpec
Sourcepub fn new(name: impl Into<String>, ty: ProtoFieldType) -> Self
pub fn new(name: impl Into<String>, ty: ProtoFieldType) -> Self
Construct a nullable column with no comment.
Sourcepub fn with_nullable(self, nullable: bool) -> Self
pub fn with_nullable(self, nullable: bool) -> Self
Builder: set nullability.
Sourcepub fn with_comment(self, comment: Comment) -> Self
pub fn with_comment(self, comment: Comment) -> Self
Builder: attach a comment.
Trait Implementations§
Source§impl Clone for ColumnSpec
impl Clone for ColumnSpec
Source§fn clone(&self) -> ColumnSpec
fn clone(&self) -> ColumnSpec
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 ColumnSpec
impl Debug for ColumnSpec
Source§impl PartialEq for ColumnSpec
impl PartialEq for ColumnSpec
impl Eq for ColumnSpec
impl StructuralPartialEq for ColumnSpec
Auto Trait Implementations§
impl Freeze for ColumnSpec
impl RefUnwindSafe for ColumnSpec
impl Send for ColumnSpec
impl Sync for ColumnSpec
impl Unpin for ColumnSpec
impl UnwindSafe for ColumnSpec
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