Skip to main content

copy_buffer_inserts

Function copy_buffer_inserts 

Source
pub fn copy_buffer_inserts(
    table: &str,
    columns: Option<&[String]>,
    target_cols: &[String],
    options: &CopyOptions,
    data: &str,
) -> Result<Vec<String>, EngineError>
Expand description

v7.39 (round 249) — decode a whole COPY … FROM '<file>' buffer (the HOST read the file; the engine is no_std and performs no I/O) into the per-row INSERT statements both hosts drive. Text and CSV formats honour DELIMITER / NULL / HEADER / QUOTE; the text-format \. terminator ends the data early, as in PG.

§Errors

Non-UTF-8 CSV input is refused (the text path takes &str too, so it can’t arise there).