pub fn stream_blocks(self) -> BoxStream<Block> {
        let query = self.query;
        let timeout = try_opt_stream!(self.client.context.options.get()).query_block_timeout;

        self.client.wrap_stream(move |mut c| -> BoxStream<Block> {
            info!("[send query] {}", query.get_sql());

            c.pool.detach();

            let context = c.context.clone();
            let pool = c.pool.clone();

            let stream = BlockStream::new(
                c.inner
                    .take()
                    .unwrap()
                    .call(Cmd::SendQuery(query, context.clone())),
                context,
                pool,
            );

            if let Some(timeout) = timeout {
                Box::new(stream.timeout(timeout).map_err(|err| err.into()))
            } else {
                Box::new(stream)
            }
        })
    }
/// Method that produces a stream of blocks containing rows
///
/// example:
/// ```rust
/// # extern crate clickhouse_rs;
/// # extern crate futures;
/// # use futures::{Future, Stream};
/// # use clickhouse_rs::Pool;
/// # use std::env;
/// # let database_url = env::var("DATABASE_URL").unwrap_or("tcp://localhost:9000?compression=lz4".into());
/// # let pool = Pool::new(database_url);
/// # let done =
///  pool.get_handle()
///      .and_then(|c| {
/// #        let sql_query = "SELECT number FROM system.numbers LIMIT 100000";
///          c.query(sql_query)
///              .stream_blocks()
///              .for_each(|block| {
///                  println!("{:?}\nblock counts: {} rows", block, block.row_count());
/// #                Ok(())
///              })
///      })
/// #    .map(|_| ())
/// #    .map_err(|err| eprintln!("database error: {}", err));
/// # tokio::run(done)
/// ```
Method that produces a stream of blocks containing rows
example:
```rust
Method that produces a stream of blocks containing rows example : ` ` ` rust
pub fn stream_blocks(self) -> BoxStream<Block> {
        let query = self.query;
        let timeout = try_opt_stream!(self.client.context.options.get()).query_block_timeout;
        self.client.wrap_stream(move |mut c| -> BoxStream<Block> {
            info!("[send query] {}", query.get_sql());
            c.pool.detach();
            let context = c.context.clone();
            let pool = c.pool.clone();
            let stream = BlockStream::new(
                c.inner
                    .take()
                    .unwrap()
                    .call(Cmd::SendQuery(query, context.clone())),
                context,
                pool,
            );
            if let Some(timeout) = timeout {
                Box::new(stream.timeout(timeout).map_err(|err| err.into()))
            } else {
                Box::new(stream)
            }
        })
    }
pub fn stream_blocks ( self ) -> BoxStream < Block > { let query = self . query ; let timeout = try_opt_stream ! ( self client context options get ( ) ) . query_block_timeout ; self . client . wrap_stream ( move | mut c | -> BoxStream < Block > { info ! ( " " query get_sql ( ) ) ; c . pool . detach ( ) ; let context = c . context . clone ( ) ; let pool = c . pool . clone ( ) ; let stream = BlockStream :: new ( c . inner . take ( ) . unwrap ( ) . call ( Cmd :: SendQuery ( query , context . clone ( ) ) ) , context , pool , ) ; if let Some ( timeout ) = timeout { Box :: new ( stream . timeout ( timeout ) . map_err ( | err | err . into ( ) ) ) } else { Box :: new ( stream ) } } ) }
Method that produces a stream of blocks containing rows
example:
```rust
Method that produces a stream of blocks containing rows example : ` ` ` rust
self
self
extern crate clickhouse_rs;
None
extern crate futures;
None
use futures::{future, stream};
None
use clickhouse_rs::pool;
None
use std::env;
None
let database_url = env::var("database_url").unwrap_or("tcp://localhost:9000?compression=lz4".into());
None
let pool = pool::new(database_url);
None
let done 
pool.get_handle()
.and_then(|c| {
pool . get_handle () . and_then ( |c| {
let sql_query = "select number from system.numbers limit 100000";
None
ok(())
None
.map(|_| ())
None
.map_err(|err| eprintln!("database error: {}", err));
None
tokio::run(done)
None