Skip to main content

for_each_data_row

Function for_each_data_row 

Source
pub fn for_each_data_row<F>(
    table_file: &Path,
    table_schema: &TableSchema,
    dialect: SqlDialect,
    extraction: RowExtraction,
    f: F,
) -> Result<()>
Expand description

Walk every data row of a per-table SQL file, invoking f for each row.

Handles the INSERT/COPY-header/COPY-data statement dispatch (including tracking the COPY column order across statements) that was previously hand-rolled in every sampling/sharding loop.