-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Update multiple rows at one time #7326
Comments
We would like to see this feature, specifically for postgres. I would be happy to implement it if given some guidance. |
@eporomaa Any updates on this feature? |
@arunraj6 Not from my side. await entityManager.query(`SELECT public.f_transact(array[${str}]::public.type_transaction[])`)
For future reference: Updating multple rows at once in postgres can be done using psql like such:
From: https://stackoverflow.com/questions/18797608/update-multiple-rows-in-same-query-using-postgresql |
Thanks for these helpful details 👍 |
It's ridiculous to find a solution to the same problem for me. Finally, just use Typeform.Repository.save(Entity[]) is perfect to solve.
|
I want to use this solution, but I have to use sql function on query, so I couldn't use it. |
But I do not hope that |
1 similar comment
But I do not hope that |
any update on this, ANY WORKAROUND METHOAD FOR THIS |
@dileepainivossl |
.save is doing too much magic and can cause some weird bugs in your app. I would highly recommend against if you're serious about your app .save will try to do a select first and then decide whether or not to save or update. This may seem like it's good but there are many implications. Such as performance and concurrency and behaviour expectations. |
|
Feature Description
The Problem
There seems no way to update many rows by one call.
The Solution
Implement a method that to update multiple rows by one call.
For example)
You wanna make a query like below.
And I think It's not bad to provide the method like this.
It'll must be considered by many aspects.
Considered Alternatives
Implement a method yourself to update multiple rows at one time .
Additional Context
Relevant Database Driver(s)
aurora-data-api
aurora-data-api-pg
better-sqlite3
cockroachdb
cordova
expo
mongodb
mysql
nativescript
oracle
postgres
react-native
sap
sqlite
sqlite-abstract
sqljs
sqlserver
Are you willing to resolve this issue by submitting a Pull Request?
The text was updated successfully, but these errors were encountered: