⚠️ Please beware that this is a BREAKING CHANGE ⚠️
Essentially, it allows to use the same API db: impl Executor<...> in Insert::insert instead of the odd db: &mut Connection<...>.
The reason for that special case was to fetch the newly created id for MySQL by reusing the connection.
This solution implements that by opening a transaction when generating Insert::insert for MySQL.
This implements the solution discussed in https://github.com/NyxCode/ormx/issues/22#issuecomment-1010043291
⚠️ Please beware that this is a BREAKING CHANGE ⚠️
Essentially, it allows to use the same API
db: impl Executor<...>
inInsert::insert
instead of the odddb: &mut Connection<...>
. The reason for that special case was to fetch the newly createdid
for MySQL by reusing the connection.This solution implements that by opening a transaction when generating
Insert::insert
for MySQL.