The latest doc pages for the PooledConnection of the mysql crate still suggest to make use of "prepare" and "prep_exec":
https://docs.rs/mysql/20.1.0/mysql/struct.PooledConn.html
"You should prefer using prepare
or prep_exec
instead of query
where possible, except cases when statement has no params and when it has no return values or return values which evaluates to Value::Bytes
"
This is wrong ever since those functions were deprecated and/or moved to mysql::prelude::Queryable under different names.
A better and up-to-date hint would be:
"You should prefer using prep
along exec
instead of query
from the Queryable trait where possible, except cases when statement has no params and when it has no return values or return values which evaluates to Value::Bytes
"
On a side note, it is very unintuitive to not have the implemented functions from traits in the side bar nor have them searchable on the page, because they are hidden behind a collapsed " [Hide undocumented items]". It is hard to figure out which functions are available for the class in the first place, even if the hint section would use up-to-date functions.
That said, I really like my first contact to Rust conceptual wise. It takes some more time to get used to the heavy wrapping, but I'll get there.