Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to handle upserts? #49

Open
chrisburr opened this issue Jul 6, 2023 · 0 comments
Open

How to handle upserts? #49

chrisburr opened this issue Jul 6, 2023 · 0 comments

Comments

@chrisburr
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant