bun icon indicating copy to clipboard operation
bun copied to clipboard

Raw queries should allow scanning row by row

Open john8329 opened this issue 2 months ago • 2 comments

Hi, for performance reasons (and coherence with the standard sql query), when doing db.NewRaw(query) the returned object should have the .Rows() property for using an iterator instead of scanning the whole result. This is crucial for big workloads where batching is required to avoid using too much memory (exporting for example). Right now the only workaround I can think of is manually adding offset and limit.

Thanks

john8329 avatar Oct 25 '25 07:10 john8329

This issue has been automatically marked as stale because it has not had activity in the last 30 days. If there is no update within the next 7 days, this issue will be closed.

github-actions[bot] avatar Nov 25 '25 03:11 github-actions[bot]

well, bump. This is a pretty important hole in the features.

john8329 avatar Nov 25 '25 10:11 john8329