ormx
ormx copied to clipboard
Upgrade sqlx from 0.6 to 0.7
I am trying to update sqlx to 0.7, but Insert trait let mut tx = db.begin().await?; db: impl Executor has no begin method on sqlx 0.7
db: &mut <Db as Database>::Connection,
row: impl Insert<Table = Self>,
) -> BoxFuture<Result<Self>> {
- row.insert(db)
+ row.insert(&mut *db)
}
/// Insert a row into the database, returning the inserted row.
- fn insert<'a, 'c: 'a>(
+ fn insert(
self,
- db: impl Executor<'c, Database = Db> + 'a,
- ) -> BoxFuture<'a, Result<Self::Table>>;
+ db: &mut impl sqlx::Connection<Database = Db, Options=sqlx::mysql::MySqlConnectOptions>,
+ ) -> BoxFuture<Result<Self::Table>>;
}