pub struct Field {
pub name: String,
pub ty: LogicalType,
pub not_null: bool,
}Expand description
A named field of a STRUCT or a UNION, and a named column of a table.
Fields§
§name: StringThe field name, unquoted and case sensitive as stored.
ty: LogicalTypeThe field type.
not_null: boolWhether the column refuses nulls, which is the NOT NULL the DDL declared it with.
Always false inside a STRUCT or a UNION, because a null is a property of a value at
every nesting level and no type in SQL says a value cannot be one. This is here rather than
on a separate column type because a table column is already spelled with this struct, and a
second one that was this one plus a flag would have to be threaded through the binder, the
scope and every operator schema to carry a bit that only the insert path reads.
Implementations§
Trait Implementations§
impl Eq for Field
impl StructuralPartialEq for Field
Auto Trait Implementations§
impl Freeze for Field
impl RefUnwindSafe for Field
impl Send for Field
impl Sync for Field
impl Unpin for Field
impl UnsafeUnpin for Field
impl UnwindSafe for Field
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