Allow `exec_with_returning_many` with MariaDB
@Huliiiiii is already working on this.
Since May 9, 2026.
- Dominant language
- Rust
- Stars
- 9.9k
- Forks
- 735
- Avg merge
- 6h 36m
- Merged PRs (30d)
- 8
Description
Motivation
Currently, when using a MariaDB as backend, it is hidden behind the MySql backend, which is normal. However, there are things that are not available in MySQL but in MariaDB, like the INSERT ... RETURNING syntax. Nevertheless, the methods building queries with the "returning" syntax are configured to be only available with the Postgres and Sqlite backend (see https://docs.rs/sea-orm/latest/src/sea_orm/database/db_connection.rs.html#585).
Proposed Solutions
Just add a match arm in the DbBackend::support_returning method, for the MySql backend, with an additional feature, similar to "sqlite-use-returning-for-3_35", e.g. "mariadb".
This way, developers using MariaDB will be able to use the "returning" syntax, by enabling this feature.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.