Skip to content

Update item transactions in SQLAlchemy #303

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

Merged
merged 27 commits into from
Dec 10, 2021
Merged

Update item transactions in SQLAlchemy #303

merged 27 commits into from
Dec 10, 2021

Conversation

jonhealy1
Copy link
Collaborator

Related Issue(s): #302

Description:

Different collections can have items with the same ids. To delete or update an item, a collection should be specified. In core.py for sqlalchemy, get_item was recently changed so that only an item from the right collection is returned. This is a similar idea.

PR Checklist:

  • Code is formatted and linted (run pre-commit run --all-files)
  • Tests pass (run make test)
  • Documentation has been updated to reflect changes, if applicable, and docs build successfully (run make docs)
  • Changes are added to the CHANGELOG.

Copy link
Member

@lossyrob lossyrob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some comments.

Also this PR should have tests that prove the update and delete work in the case where two collections have the same Item ID, which I think would have caught the issues I pointed out.

@jonhealy1
Copy link
Collaborator Author

Added some comments.

Also this PR should have tests that prove the update and delete work in the case where two collections have the same Item ID, which I think would have caught the issues I pointed out.

I will write some tests

@jonhealy1 jonhealy1 requested a review from lossyrob November 30, 2021 19:50
@jonhealy1
Copy link
Collaborator Author

jonhealy1 commented Nov 30, 2021

@lossyrob Thanks for the feedback - I think the tests are good ... and everything is good now

Copy link
Collaborator

@moradology moradology left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've gone through the changes here and they look good to me - @lossyrob were there any amendments you had in mind?

Copy link
Collaborator

@geospatial-jeff geospatial-jeff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @jonhealy1

@lossyrob lossyrob merged commit 79c0cee into stac-utils:master Dec 10, 2021
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.

5 participants