You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To my mind it is better to have public FromSql trait. Sometimes there is a need to write generics like this:
fn get_db_column<T>(column_name: &str, query: &str) -> Vec<T>
where T: Send + FromSql
{
let mut runtime = tokio::runtime::Runtime::new()
.expect("Unable to create a runtime");
let pool = Pool::new(get_clickhouse_addr());
let done = pool
.get_handle()
.and_then(move |c| c.query(query).fetch_all())
.and_then(move |(_, block)| {
let mut column_vec = vec!();
for row in block.rows() {
let item: T = row.get(column_name)
...
The text was updated successfully, but these errors were encountered:
To my mind it is better to have public FromSql trait. Sometimes there is a need to write generics like this:
The text was updated successfully, but these errors were encountered: