pub struct Block<K: ColumnType = Simple> { /* private fields */ }
Expand description
Represents Clickhouse Block
Implementations§
Source§impl Block
impl Block
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Constructs a new, empty Block
with the specified capacity.
Source§impl<K: ColumnType> Block<K>
impl<K: ColumnType> Block<K>
Sourcepub fn column_count(&self) -> usize
pub fn column_count(&self) -> usize
Return the number of columns in the current block.
Sourcepub fn get<'a, T, I>(&'a self, row: usize, col: I) -> Result<T>
pub fn get<'a, T, I>(&'a self, row: usize, col: I) -> Result<T>
Get the value of a particular cell of the block.
Sourcepub fn add_column<S>(self, name: &str, values: S) -> Selfwhere
S: ColumnFrom,
pub fn add_column<S>(self, name: &str, values: S) -> Selfwhere
S: ColumnFrom,
Add new column into this block
Sourcepub fn column<S>(self, name: &str, values: S) -> Selfwhere
S: ColumnFrom,
pub fn column<S>(self, name: &str, values: S) -> Selfwhere
S: ColumnFrom,
Add new column into this block
Sourcepub fn push<B: RowBuilder>(&mut self, row: B) -> Result<()>
pub fn push<B: RowBuilder>(&mut self, row: B) -> Result<()>
This method is a convenient way to pass row into a block.
Sourcepub fn get_column<I>(&self, col: I) -> Result<&Column<K>>where
I: ColumnIdx + Copy,
pub fn get_column<I>(&self, col: I) -> Result<&Column<K>>where
I: ColumnIdx + Copy,
This method finds a column by identifier.
Trait Implementations§
Source§impl<K: ColumnType> Clone for Block<K>
impl<K: ColumnType> Clone for Block<K>
Source§impl<K: ColumnType> Debug for Block<K>
impl<K: ColumnType> Debug for Block<K>
Source§impl<L: ColumnType, R: ColumnType> PartialEq<Block<R>> for Block<L>
impl<L: ColumnType, R: ColumnType> PartialEq<Block<R>> for Block<L>
Auto Trait Implementations§
impl<K> Freeze for Block<K>
impl<K = Simple> !RefUnwindSafe for Block<K>
impl<K> Send for Block<K>
impl<K> Sync for Block<K>
impl<K> Unpin for Block<K>where
K: Unpin,
impl<K = Simple> !UnwindSafe for Block<K>
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