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

Test Table.test-upserts() #44

Merged
merged 1 commit into from
Nov 21, 2024
Merged

Test Table.test-upserts() #44

merged 1 commit into from
Nov 21, 2024

Conversation

pydanny
Copy link
Contributor

@pydanny pydanny commented Nov 21, 2024

This PR does the following:

  • Adds tests for fastlite's Table.upsert() method
  • If an upsert's argument doesn't contain an input with fields/values, returns an empty dict
  • If an upsert doesn't include a valid primary key, raises a MissingPrimaryKey error. This makes it easier to correct and move forward
  • Works with both the current sqlite-minutils implementation and Add data returns for INSERT/UPDATE/UPSERT sqlite-minutils#42

Co-authored-by: Audrey Roy Greenfeld <arg@answer.ai>
Copy link

gitnotebooks bot commented Nov 21, 2024

Found 1 changed notebook. Review the changes at https://app.gitnotebooks.com/AnswerDotAI/fastlite/pull/44

@jph00
Copy link
Contributor

jph00 commented Nov 21, 2024

Great!

@jph00 jph00 merged commit d038da2 into main Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants