blackbeam / mysql_async

Asyncronous Rust Mysql driver based on Tokio.
Apache License 2.0
372 stars 113 forks source link

Questions from Rust newbies #270

Closed Vjze closed 7 months ago

Vjze commented 7 months ago

When there are more than 12 query items, an error will be reported, but within 12 items, it can run normally. Why is this? 1 2

https://github.com/blackbeam/mysql_async/assets/99671889/1e7cad5a-bbdd-464f-b4fc-be9a1c0495d3

blackbeam commented 7 months ago

Hi. 12 is a usual maximum arity for tuples that implements traits. Consider using something like this:

conn.query_map("...", |row: mysql_async::Row| {
    // do something with mysql_async::Row
});