Commit f33e112
committed
Fixed screen repository to use atomic upsert
Ensures the upsert happens only if there isn't a conflict. This also prevents unique constraint issues with duplicate key value. This, unfortunately, introduces code that is a bit more complex and isn't ideal. Leaving these comments in for now in order to address in the future because I think this can be extracted further.
Issue: 339
Milestone: patch1 parent 5e9ab0c commit f33e112
1 file changed
Lines changed: 13 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
43 | 45 | | |
44 | | - | |
45 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
46 | 56 | | |
| 57 | + | |
47 | 58 | | |
48 | 59 | | |
49 | 60 | | |
| |||
54 | 65 | | |
55 | 66 | | |
56 | 67 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | 68 | | |
63 | 69 | | |
64 | 70 | | |
0 commit comments