pub struct ColumnFixedString { /* private fields */ }Expand description
Column for fixed-length strings (all strings padded to same length)
Stores binary data of exactly N bytes per element, zero-padded if needed.
ClickHouse Reference: https://clickhouse.com/docs/en/sql-reference/data-types/fixedstring
Implementations§
Source§impl ColumnFixedString
impl ColumnFixedString
Sourcepub fn new(type_: Type) -> Self
pub fn new(type_: Type) -> Self
Creates a new empty FixedString column, extracting the fixed size from the type.
Sourcepub fn with_capacity(type_: Type, capacity: usize) -> Self
pub fn with_capacity(type_: Type, capacity: usize) -> Self
Creates a new empty FixedString column with pre-allocated capacity for the given number of elements.
Sourcepub fn with_data(self, data: Vec<String>) -> Self
pub fn with_data(self, data: Vec<String>) -> Self
Create a column with initial data (builder pattern)
Sourcepub fn get(&self, index: usize) -> Option<String>
pub fn get(&self, index: usize) -> Option<String>
Returns the string at the given index, or None if out of bounds.
Sourcepub fn fixed_size(&self) -> usize
pub fn fixed_size(&self) -> usize
Returns the fixed byte size of each element in the column.
Trait Implementations§
Source§impl Column for ColumnFixedString
impl Column for ColumnFixedString
Source§fn column_type(&self) -> &Type
fn column_type(&self) -> &Type
Get the type of this column
Source§fn append_column(&mut self, other: ColumnRef) -> Result<()>
fn append_column(&mut self, other: ColumnRef) -> Result<()>
Append another column’s data to this column
Source§fn load_from_buffer(&mut self, buffer: &mut &[u8], rows: usize) -> Result<()>
fn load_from_buffer(&mut self, buffer: &mut &[u8], rows: usize) -> Result<()>
Load column data from byte buffer
Source§fn clone_empty(&self) -> ColumnRef
fn clone_empty(&self) -> ColumnRef
Create an empty clone of this column (same type, no data)
Source§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Downcast to a mutable concrete column type
Auto Trait Implementations§
impl Freeze for ColumnFixedString
impl RefUnwindSafe for ColumnFixedString
impl Send for ColumnFixedString
impl Sync for ColumnFixedString
impl Unpin for ColumnFixedString
impl UnwindSafe for ColumnFixedString
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