pub struct ColumnDate { /* private fields */ }Expand description
Column for Date type (stored as UInt16 - days since Unix epoch 1970-01-01)
Range: 1970-01-01 to 2149-06-06
ClickHouse Reference: https://clickhouse.com/docs/en/sql-reference/data-types/date
C++ Implementation Pattern:
Uses delegation to ColumnUInt16 for storage, matching the C++
clickhouse-cpp reference implementation’s std::shared_ptr<ColumnUInt16> data_ pattern.
Implementations§
Source§impl ColumnDate
impl ColumnDate
Sourcepub fn with_data(self, data: Vec<u16>) -> Self
pub fn with_data(self, data: Vec<u16>) -> Self
Returns a new column populated with the given days-since-epoch values.
Sourcepub fn append_timestamp(&mut self, timestamp: i64)
pub fn append_timestamp(&mut self, timestamp: i64)
Append from Unix timestamp (seconds since epoch)
Sourcepub fn timestamp_at(&self, index: usize) -> i64
pub fn timestamp_at(&self, index: usize) -> i64
Get Unix timestamp (seconds) at index
Sourcepub fn data(&self) -> &ColumnUInt16
pub fn data(&self) -> &ColumnUInt16
Get reference to underlying data column (for advanced use)
Trait Implementations§
Source§impl Column for ColumnDate
impl Column for ColumnDate
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 ColumnDate
impl RefUnwindSafe for ColumnDate
impl Send for ColumnDate
impl Sync for ColumnDate
impl Unpin for ColumnDate
impl UnwindSafe for ColumnDate
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