Skip to content

Add flow for crud transactions #245

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 4 commits into from
Aug 18, 2025
Merged

Add flow for crud transactions #245

merged 4 commits into from
Aug 18, 2025

Conversation

simolus3
Copy link
Contributor

@simolus3 simolus3 commented Aug 14, 2025

Sometimes, users want a batch of data to upload while also ensuring that that batch respects transaction boundaries. At the moment, we don't really have APIs for that, because:

  • getCrudBatch() returns a batch of items with a flexible size limit, but doesn't respect transaction boundaries (so it's possible to accidentally upload half of a transaction).
  • getNextCrudTransaction() returns a complete transaction, but nothing more. It will also always return the oldest transaction, so you can't call getNextCrudTransaction() multiple times to get more than one.

This adds getCrudTransactions(), a Flow that starts with the oldest transaction and then keeps on returning more transactions until the collector aborts. This gives users a tool to compose batches with flexible sizes while still ensuring everything is grouped by transactions.

@simolus3 simolus3 force-pushed the get-crud-transactions branch from 2b1c655 to f0d6b68 Compare August 18, 2025 08:41
@simolus3 simolus3 merged commit 48efa34 into main Aug 18, 2025
5 checks passed
@simolus3 simolus3 deleted the get-crud-transactions branch August 18, 2025 11:44
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