diff options
author | Teddy Wing | 2017-08-17 22:38:29 +0200 |
---|---|---|
committer | Teddy Wing | 2017-08-17 22:38:29 +0200 |
commit | 01e7c70a9ff6a6514706b6de2229c63c83aad65d (patch) | |
tree | 4bc6b8df07c3ab9bb9105bae2a7092b3c73b33f9 /src/Lib.hs | |
parent | ce5e3cf7fe71c5c508c7eaecfb2280b9346e792a (diff) | |
download | sorbot-01e7c70a9ff6a6514706b6de2229c63c83aad65d.tar.bz2 |
gitRemoteSetOriginAction: Upsert instead of insert
I had used `INSERT` as a placeholder while trying to get the plugin
working properly. This would create a row every time the "git remote set
origin" command was invoked. What I really wanted was an upsert.
Looked through a number of different ways of accomplishing that in
SQLite:
- https://stackoverflow.com/questions/418898/sqlite-upsert-not-insert-or-replace/7511635#7511635
- https://stackoverflow.com/questions/15277373/sqlite-upsert-update-or-insert
Ended up settling on this solution from CL.:
https://stackoverflow.com/questions/20323174/upsert-in-sqlite/20326705#20326705
It seemed to be pretty clean and understandable, so I leveraged that
approach.
Diffstat (limited to 'src/Lib.hs')
0 files changed, 0 insertions, 0 deletions