[−][src]Struct clickhouse_rs::types::QueryResult
Result of a query or statement execution.
Implementations
impl QueryResult
[src]
pub fn fold<F, T, Fut>(
self,
init: T,
f: F
) -> impl Future<Item = (ClientHandle, T), Error = Error> where
F: Fn(T, Row<Simple>) -> Fut + Send + Sync + 'static,
Fut: IntoFuture<Item = T, Error = Error> + Send + 'static,
Fut::Future: Send,
T: Send + 'static,
[src]
self,
init: T,
f: F
) -> impl Future<Item = (ClientHandle, T), Error = Error> where
F: Fn(T, Row<Simple>) -> Fut + Send + Sync + 'static,
Fut: IntoFuture<Item = T, Error = Error> + Send + 'static,
Fut::Future: Send,
T: Send + 'static,
Method that applies a function to each row, producing a single, final value.
example:
pool.get_handle() .and_then(|c| { c.query("SELECT number FROM system.numbers LIMIT 10000000") .fold(0, |acc, row| { let number: u64 = row.get("number")?; Ok(acc + number) }) })
pub fn fetch_all(
self
) -> Box<dyn Future<Item = (ClientHandle, Block<Complex>), Error = Error> + Send>
[src]
self
) -> Box<dyn Future<Item = (ClientHandle, Block<Complex>), Error = Error> + Send>
Fetch data from table. It returns a block that contains all rows.
pub fn fold_blocks<F, T, Fut>(
self,
init: T,
f: F
) -> impl Future<Item = (ClientHandle, T), Error = Error> where
F: Fn(T, Block) -> Fut + Send + 'static,
Fut: IntoFuture<Item = T, Error = Error> + Send + 'static,
Fut::Future: Send,
T: Send + 'static,
[src]
self,
init: T,
f: F
) -> impl Future<Item = (ClientHandle, T), Error = Error> where
F: Fn(T, Block) -> Fut + Send + 'static,
Fut: IntoFuture<Item = T, Error = Error> + Send + 'static,
Fut::Future: Send,
T: Send + 'static,
Method that applies a function to each block, producing a single, final value.
pub fn stream_blocks(
self
) -> Box<dyn Stream<Item = Block, Error = Error> + Send>
[src]
self
) -> Box<dyn Stream<Item = Block, Error = Error> + Send>
Method that produces a stream of blocks containing rows
example:
pool.get_handle() .and_then(|c| { c.query(sql_query) .stream_blocks() .for_each(|block| { println!("{:?}\nblock counts: {} rows", block, block.row_count()); }) })
pub fn stream_rows(
self
) -> Box<dyn Stream<Item = Row<'static, Simple>, Error = Error> + Send>
[src]
self
) -> Box<dyn Stream<Item = Row<'static, Simple>, Error = Error> + Send>
Method that produces a stream of rows
Auto Trait Implementations
impl !RefUnwindSafe for QueryResult
impl Send for QueryResult
impl Sync for QueryResult
impl Unpin for QueryResult
impl !UnwindSafe for QueryResult
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, 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>,