Skip to main content

read_csv_core

Function read_csv_core 

Source
pub async fn read_csv_core<'a>(
    path_data: &PathData<'a>,
    opts: &OptionSet,
    save_opt: Option<SaveRowFn>,
    out_ref: Option<&str>,
) -> Result<ResultSet, GenericError>
Expand description

Process a CSV/TSV file asynchronously with an optional row save method and output reference (file or database table reference)

Reads with has_headers(false) and drives header/gap/data classification manually by 0-based line index (mirroring the calamine path in read_single_worksheet) rather than relying on the csv crate’s own implicit “always skip the first line” behavior – needed to honor header_row/data_row_index (including the case where they’re equal: a CSV with predefined/external headers where no line is actually consumed as a header, e.g. omit_header with a fixed schema via --keys).