Commit af89838
committed
fix: use insert ignore for filecache_extended
The current approach is to insert a new row and, if a unique constraint violation occurs, update an existing one. PostgreSQL logs the unique constraint violation as error "duplicate key value violates unique constraint".
Our Adapter.insertIgnoreConflict method provides a way to run an insert query without logging such errors by using the vendor-specific sql extensions like "on conflict do nothing" on Postgres.
Signed-off-by: Daniel Kesselberg <[email protected]>1 parent bbb6cb2 commit af89838
1 file changed
+6
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
359 | 359 | | |
360 | 360 | | |
361 | 361 | | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
371 | 366 | | |
372 | | - | |
373 | | - | |
| 367 | + | |
374 | 368 | | |
375 | 369 | | |
376 | 370 | | |
| |||
386 | 380 | | |
387 | 381 | | |
388 | 382 | | |
389 | | - | |
| 383 | + | |
390 | 384 | | |
391 | 385 | | |
392 | 386 | | |
| |||
0 commit comments