SeaQL / SeaQL/sea-orm

Allow `exec_with_returning_many` with MariaDB

Open
#2,709 5 comments 1 reaction 1 assignee View on GitHub

@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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.