Upgrading sqlx 0.4 to 0.5
Breaking0.4.2 → 0.5.13Breaking6New42Changed19Fixed47Other15
BreakingUpgrade verdict
6 breaking changes.
In plain terms
- Removes the `'static` bound on `Connection::transaction`.
- The attribute used to set the database-side type name has a new name.
- Types previously named DbDone are now called DbQueryResult.
- The Done trait is gone, but rows_affected is still available directly on result types like PgQueryResult.
Must act Top 3 of 6 that need code or config changes
What you must change
Breaking6
Removes the
'static bound on Connection::transaction.Connection::transactionRenames the
#[sqlx(rename)] attribute to #[sqlx(type_name)].#[sqlx(rename)]#[sqlx(type_name)]Renames the
DbDone types to DbQueryResult.DbDoneDbQueryResultRemoves the
Done trait; .rows_affected() is now an inherent method on query result types.Donerows_affected()PgQueryResultMySqlQueryResultRemoves
any::AnyType, replaced by directly implementing Type<Any>.any::AnyTypeType<Any>Reverts #1748 because the generated PgHasArrayType impl conflicts with manual impls of the trait; the change waits for 0.6.0.
PgHasArrayType