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

Added bulk item inserts for pgstac implementation #411

Merged
merged 2 commits into from Jun 16, 2022
Merged

Added bulk item inserts for pgstac implementation #411

merged 2 commits into from Jun 16, 2022

Conversation

mshalak-nix
Copy link
Contributor

@mshalak-nix mshalak-nix commented Jun 16, 2022

Related Issue(s):

Description:
Added implementation for bulk item inserts for pgstac, similar to what is implemented for sqlalchemy.

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.

await dbfunc(pool, "create_items", items)

return_msg = f"Successfully added {len(items)} items."
return return_msg
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same format for bulk inserts as used in sqlalchemy implementation

Copy link
Collaborator

@bitner bitner left a comment

Choose a reason for hiding this comment

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

@mshalak-nix This looks great! Thanks for adding this!

@bitner bitner merged commit 226bdc0 into stac-utils:master Jun 16, 2022
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