pub struct LogicalType { /* private fields */ }
Expand description
Represents a logical type in the database - the underlying physical type can differ depending on the implementation
Implementations§
Source§impl LogicalType
impl LogicalType
pub fn new(typ: LogicalTypeId) -> Self
Sourcepub fn new_map_type(key: &LogicalType, value: &LogicalType) -> Self
pub fn new_map_type(key: &LogicalType, value: &LogicalType) -> Self
Creates a map type from its key type and value type.
§Arguments
type
: The key type and value type of map type to create.returns
: The logical type.
Sourcepub fn new_list_type(child_type: &LogicalType) -> Self
pub fn new_list_type(child_type: &LogicalType) -> Self
Creates a list type from its child type.
§Arguments
type
: The child type of list type to create.returns
: The logical type.
Sourcepub fn new_struct_type(shape: HashMap<&str, LogicalType>) -> Self
pub fn new_struct_type(shape: HashMap<&str, LogicalType>) -> Self
Sourcepub fn new_union_type(shape: HashMap<&str, LogicalType>) -> Self
pub fn new_union_type(shape: HashMap<&str, LogicalType>) -> Self
Sourcepub fn type_id(&self) -> LogicalTypeId
pub fn type_id(&self) -> LogicalTypeId
Trait Implementations§
Source§impl Clone for LogicalType
impl Clone for LogicalType
Source§impl Debug for LogicalType
impl Debug for LogicalType
Source§impl Drop for LogicalType
impl Drop for LogicalType
Source§impl From<*mut c_void> for LogicalType
impl From<*mut c_void> for LogicalType
Source§fn from(ptr: duckdb_logical_type) -> Self
fn from(ptr: duckdb_logical_type) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for LogicalType
impl RefUnwindSafe for LogicalType
impl !Send for LogicalType
impl !Sync for LogicalType
impl Unpin for LogicalType
impl UnwindSafe for LogicalType
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