pub async fn raw_query_pool<T>(
sql: &str,
binds: Vec<SqlValue>,
pool: &Pool,
) -> Result<Vec<T>, ExecError>Expand description
Execute arbitrary SQL with bound SqlValue params and decode each
row into T via FromRow. Bi-dialect counterpart of
raw_query.
SQL must use the dialect’s placeholder shape ($1 for
Postgres, ? for MySQL) — read it from pool.dialect().placeholder(n)
when constructing dynamic queries. Apps writing literal SQL pick
the right shape themselves.
§Errors
As raw_query.