'is it possible to get table name from AstPass in rust diesel pagination

I am working on a pagination in the rust 1.59.0 diesel diesel = { version = "1.4.8", features = ["postgres","64-column-tables","chrono"] }, this is the code looks like:

pub fn handle_big_table_query<T: QueryFragment<Pg>>(this: &Paginated<T>, mut out: AstPass<Pg>)-> QueryResult<()>{
    // get table name logic
    let select_str = format!("SELECT *, count_estimate('select * from {}') FROM  ", tablename);

    Ok(())
}

is it possible to get the table name from AstPass parameter?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source