feat(dbal): insert ignore conflict method for MySQL and SQLite#45655
feat(dbal): insert ignore conflict method for MySQL and SQLite#45655
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.
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.
A unit test would be nice
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
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