-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
feat(dbal): insert ignore conflict method for MySQL and SQLite #45655
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
Conversation
|
Actually, there is a different behaviour with PostgreSQL…
I see two solutions:
|
come-nc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On conflict this ones updates the row while pgsql implementation will not touch it, no?
Yep, see above comment :) |
Can this be an option? |
For me it ignores too many errors. I would prefer to avoid this. |
5894248 to
115abb5
Compare
bc95813 to
330d35b
Compare
|
Finally, it seems From MySQL documentation
The other way is to update all fields instead of ignore them but I failed to achieve this with Oracle. It's sad because it could make sense when we launch an update after the |
|
@nickvergessen Do you think it is a correct solution given the risks of ignoring other errors? |
come-nc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A unit test would be nice
Signed-off-by: Benjamin Gaussorgues <[email protected]>
Signed-off-by: Benjamin Gaussorgues <[email protected]>
330d35b to
b724368
Compare
Summary
Add ignore conflicts method for MySQL
Similar to PgSQL: https://github.com/nextcloud/server/blob/master/lib/private/DB/AdapterPgSql.php#L26-L37
Checklist