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

Support multiple tables in BatchWrite and BatchGet #226

Merged
merged 7 commits into from Feb 12, 2024
Merged

Conversation

guregu
Copy link
Owner

@guregu guregu commented Jan 23, 2024

This PR adds some new methods to BatchWrite and BatchGet that let them target multiple tables.
The API is a little bit ugly to keep backwards compatibility.

New stuff:

  • (*BatchWrite).PutIn for putting items in other tables
  • (*BatchWrite).DeleteIn and (*BatchWrite).DeleteInRange for deleting items in other tables
  • (*BatchGet).From and (*BatchGet).FromRange for getting items from other tables
  • (*BatchGet).ProjectTable for specifying table-specific projections
  • (*BatchGet).IterWithTable for creating an iterator that keeps track of which table each item comes from

TODO

  • Implementation
  • Tests
    • Add CI via GH actions

Mentioned in #113 as one of the features I want to change in v2 (or maybe v3 at this rate, I'll port this to the v2 branch soon).

@guregu guregu merged commit 137ce45 into master Feb 12, 2024
2 checks passed
@guregu guregu deleted the multi-table-batch branch February 12, 2024 05:30
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.

None yet

1 participant