Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use native database upsert for MySQL #16876

Open
rothfels opened this issue Dec 16, 2022 · 6 comments
Open

Use native database upsert for MySQL #16876

rothfels opened this issue Dec 16, 2022 · 6 comments
Labels
kind/feature A request for a new feature. team/client Issue for team Client. topic: mysql topic: upsert nested upsert topic: upsert()

Comments

@rothfels
Copy link

rothfels commented Dec 16, 2022

Problem

Prisma support for native SQL upserts was recently added for CockroachDB, PostgreSQL, SQLite.

Equivalent functionality has not yet been added for the MySQL datasource.

previous discussion

Suggested solution

Use the same rules for choosing native MySQL upserts as for PostgreSQL etc, but use MySQL ON DUPLICATE KEY syntax.

@rothfels rothfels changed the title Use native SQL upserts for MySQL Use native database upsert for MySQL Dec 16, 2022
@janpio janpio added kind/feature A request for a new feature. topic: mysql team/client Issue for team Client. topic: upsert nested upsert labels Dec 16, 2022
@paulwer

This comment was marked as off-topic.

@mdatsev
Copy link

mdatsev commented Apr 22, 2023

+1. ran into the same race condition because of this

@celso-alexandre
Copy link

celso-alexandre commented Sep 20, 2023

In the company I work in we used prisma from the start, so I remember the time when postgres suffered from te same problem in prisma 2 (if I remember correctly). But I would really like to see this working propperly in mysql too. I know mysql isn't the main connector, but I'd really love to see it implemented.

@cah4a

This comment was marked as off-topic.

@jayarjo

This comment was marked as off-topic.

@dhirennjaypal

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature A request for a new feature. team/client Issue for team Client. topic: mysql topic: upsert nested upsert topic: upsert()
Projects
None yet
Development

No branches or pull requests

8 participants