How to handle upserts?
Open
- Dominant language
- Python
- Stars
- 19
- Forks
- 45
- Avg merge
- 4d 23h
- Merged PRs (30d)
- 12
Description
In `SandboxMetadataDB.insert` there is a need for upserting to set the last update time if the entry already exists. I suspect this isn't a unique case so it would be nice to have a standard way to do it.
I think we can `on_conflict_do_update` but it might need to be a utility function as I'm not sure about the SQL-dialect-specificness of it.
If it does need to be a utility function, perhaps it should be limited to only supporting setting a "last access time" style column.
Contributor guide
Assessment
This issue has not been assessed yet.