v0.101.0 - Async fixes
Goal of this release - Fix errors:
- implementation of
std::marker::Sendis not general enough
std::marker::Sendwould have to be implemented for the type&str
...butstd::marker::Sendis actually implemented for the type&'0 str, for some specific lifetime'0 - implementation of
sqlx::Executoris not general enough
sqlx::Executor<'_>would have to be implemented for the type&mut sqlx::PgConnection
...butsqlx::Executor<'0>is actually implemented for the type&'0 mut sqlx::PgConnection, for some specific lifetime'0
happens when query! is used inside of tokio::spawn requiring the future to be Send + 'static
Changes:
async-traitdependency added to library and used on theToConverttrait (to fix error above)- Added test coverage for
tokio::spawn, generic executor arguments, and sqlx Pool argument handling. - EasyExecutor is now implemented for both
&mutand non&mutConnection and Transaction - Removed requirement of
&mutfor connection passed intoquery!macro, now it's optional, (since inside of the macro both&mutand&are added automatically where needed, this is mentioned in the documentation) PoolTransactionwas added into Easy SQL and it's returned fromDatabase::transaction()of both Sqlite and Postgres, required to fix the errors mentioned above, when usingeasy_sql::Transactionspecificallyinto_executormethod was split out ofEasyExecutorintoEasyExecutorIntotrait, automatically implemented for every mutable reference implementingEasyExecutorand implemented manually forsqlxTypes implementingsqlx::Executor(becauseinto_executorcan't be implemented for non references ofConnectionandTransaction)fetch_mutwas removed from struct generated byquery_lazy!since, after the changes above, it accepted the exact same input asfetchfetchfromquery_lazy!now requires for the input to implementEasyExecutorIntoinstead ofEasyExecutorgenerate-readmefeature was hidden from the documentation (renamed into_generate_readme)