Skip to main content

dump_query

Function dump_query 

Source
pub fn dump_query(
    conn: &mut dyn Connection,
    sql: &str,
    backend: Backend,
    opts: &DumpOptions,
    table_name: Option<&str>,
) -> Result<String, SqlError>
Expand description

Dump the results of an arbitrary SELECT query.

Rows are streamed from a single native database cursor in bounded batch_size chunks, so fetch memory stays O(batch) rather than re-issuing an O(offset) LIMIT/OFFSET query per page. The assembled output is still buffered into the returned String (true row-to-writer streaming is a separate, deferred signature change).