blackbeam / mysql_async

Asyncronous Rust Mysql driver based on Tokio.
Apache License 2.0
377 stars 114 forks source link

v0.34.0 , FromRow macro not work #298

Closed i18nsite closed 6 months ago

i18nsite commented 6 months ago
image

error[E0277]: the trait bound db::Status: mysql_macro::FromRow is not satisfied --> alive/src/status.rs:17:25 | 17 | ...s> = m::q!("SELECT kind_id,host_id,dns_type,err,ts FROM watch"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait mysql_macro::FromValue is not implemented for db::Status, which is required by db::Status: mysql_macro::FromRow

blackbeam commented 6 months ago

Hi. I think it's a version mismatch. mysql_async::prelude::FromRow is derived, but mysql_macro::FromRow is required. It's hard to tell more without the contents of your Cargo.toml.

Also note, that I've just published mysql_async 0.34.0 that is based on the most recent version of the mysql_common crate. You should consider an update.

blackbeam commented 6 months ago

Oh, I see. I thought that mysql_macro is a local rename defined in your Cargo.toml. Anyway, it is a version mismatch problem – please report to mysql_macro maintainer and ask to update dependencies.

i18nsite commented 6 months ago

fixed in v0.34.1 , thanks