diff options
author | Teddy Wing | 2019-06-10 02:08:51 +0200 |
---|---|---|
committer | Teddy Wing | 2019-06-10 02:08:51 +0200 |
commit | 21534162124501f0410ee31cd31130aa3b92a9f3 (patch) | |
tree | f618796415ca2739c6e835beec0f075a9c496cbc /code-review-difftool | |
parent | b2768485750f267cd9ad93a161ee963a6102d402 (diff) | |
download | code-review-21534162124501f0410ee31cd31130aa3b92a9f3.tar.bz2 |
code-review-database(create_merge_base): Upsert merge base
Don't duplicate rows if we call `create_merge_base` multiple times.
Doing so would mean we'd get multiple merge base rows for the same head.
Instead, overwrite the existing merge base for a given head using an
upsert.
Thanks a bunch to MarqueIV
(https://stackoverflow.com/users/168179/marqueiv) on Stack Overflow for
demonstrating a way to do an upsert without the UPSERT syntax. This
enables us to do an upsert on SQLite < 3.24.0. Neat trick.
https://stackoverflow.com/questions/15277373/sqlite-upsert-update-or-insert/38463024#38463024
Diffstat (limited to 'code-review-difftool')
0 files changed, 0 insertions, 0 deletions