Raw queries should allow scanning row by row
Author: john8329Created Oct 25, 2025Updated Apr 4, 2026
Labelsstaleno stalebot
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
Source: uptrace/bun