[][src]Struct clickhouse_rs::types::Block

pub struct Block<K: ColumnType = Simple> { /* fields omitted */ }

Represents Clickhouse Block

Implementations

impl Block[src]

pub fn new() -> Self[src]

Constructs a new, empty Block.

pub fn with_capacity(capacity: usize) -> Self[src]

Constructs a new, empty Block with the specified capacity.

impl<K: ColumnType> Block<K>[src]

pub fn row_count(&self) -> usize[src]

Return the number of rows in the current block.

pub fn column_count(&self) -> usize[src]

Return the number of columns in the current block.

pub fn columns(&self) -> &[Column<K>][src]

This method returns a slice of columns.

pub fn get<'a, T, I>(&'a self, row: usize, col: I) -> Result<T> where
    T: FromSql<'a>,
    I: ColumnIdx + Copy
[src]

Get the value of a particular cell of the block.

pub fn add_column<S>(self, name: &str, values: S) -> Self where
    S: ColumnFrom, 
[src]

Add new column into this block

pub fn column<S>(self, name: &str, values: S) -> Self where
    S: ColumnFrom, 
[src]

Add new column into this block

pub fn is_empty(&self) -> bool[src]

Returns true if the block contains no elements.

pub fn rows(&self) -> Rows<K>[src]

This method returns a iterator of rows.

pub fn push<B: RowBuilder>(&mut self, row: B) -> Result<()>[src]

This method is a convenient way to pass row into a block.

pub fn get_column<I>(&self, col: I) -> Result<&Column<K>> where
    I: ColumnIdx + Copy
[src]

This method finds a column by identifier.

Trait Implementations

impl<K: ColumnType> AsRef<Block<K>> for Block<K>[src]

impl<K: ColumnType> Clone for Block<K>[src]

impl<K: ColumnType> Debug for Block<K>[src]

impl<K: Default + ColumnType> Default for Block<K>[src]

impl<L: ColumnType, R: ColumnType> PartialEq<Block<R>> for Block<L>[src]

Auto Trait Implementations

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.