Stream export responses in pages#198
Open
thoa100m wants to merge 1 commit into
Open
Conversation
Author
|
Maintainer note / demo evidence for #59: I added a short demo video attachment for the bounty claim. This is a server-side export change, so the demo summarizes the behavior and the verification path. What changed:
Verification rerun on May 13, 2026: Formatting: Scope note: this intentionally removes the current full-export-in-memory behavior first. The larger R2/alarm/callback continuation flow discussed in the issue can still be layered on top if maintainers want the full async architecture in a follow-up. starbasedb-59-demo.mp4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses part of #59 by changing export endpoints to stream generated output instead of accumulating full export payloads in memory before returning a response.
This patch:
ReadableStreamLIMIT/OFFSETThis does not implement the larger R2/alarm/callback continuation flow discussed in the issue. It removes the current full-table/full-dump-in-memory behavior and provides a smaller first step toward large database exports that can be layered with a background R2 flow later.
Verification
pnpm test -- src/export/dump.test.ts src/export/json.test.ts src/export/csv.test.ts src/export/index.test.ts --runpnpm exec prettier --check src/export/index.ts src/export/dump.ts src/export/json.ts src/export/csv.ts src/export/dump.test.ts src/export/json.test.ts src/export/csv.test.tsFull suite note:
pnpm test -- --runstill has existing failures insrc/rls/index.test.ts; the export test files pass./claim #59