[−][src]Struct clickhouse_rs::types::Block
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]
T: FromSql<'a>,
I: ColumnIdx + Copy,
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]
S: ColumnFrom,
Add new column into this block
pub fn column<S>(self, name: &str, values: S) -> Self where
S: ColumnFrom,
[src]
S: ColumnFrom,
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]
I: ColumnIdx + Copy,
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]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[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,
K: Unpin,
impl<K = Simple> !UnwindSafe for Block<K>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,