Skip to content

Add selectStream methods for large result sets#323

Open
simPod wants to merge 2 commits intomasterfrom
claude/streaming-select
Open

Add selectStream methods for large result sets#323
simPod wants to merge 2 commits intomasterfrom
claude/streaming-select

Conversation

@simPod
Copy link
Owner

@simPod simPod commented Mar 27, 2026

Summary

  • Adds selectStream() and selectStreamWithParams() to ClickHouseClient interface and PsrClickHouseClient
  • Returns raw PSR-7 StreamInterface instead of loading the full response into memory
  • Allows incremental processing of large query results via read(), eof(), etc.

Test plan

  • PHPStan passes (interface + implementation match)
  • Manual testing with large result sets to verify streaming behavior
  • Existing tests unaffected

https://claude.ai/code/session_01YX19TXMGf89gacogUmxHJM

Returns raw PSR-7 StreamInterface instead of loading the full response
into memory, allowing incremental processing of large query results.

https://claude.ai/code/session_01YX19TXMGf89gacogUmxHJM
@codecov
Copy link

codecov bot commented Mar 27, 2026

Codecov Report

❌ Patch coverage is 86.66667% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.41%. Comparing base (ddb1e57) to head (73797d6).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
src/Client/PsrClickHouseClient.php 86.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #323      +/-   ##
==========================================
- Coverage   94.49%   94.41%   -0.09%     
==========================================
  Files          42       42              
  Lines         709      734      +25     
==========================================
+ Hits          670      693      +23     
- Misses         39       41       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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