Expand description
CSV and TSV straight into a DynTable, fed in chunks so a stream (a file, Postgres COPY ... TO STDOUT) never has to
be held whole. RFC 4180 quoting: fields in double quotes may contain the delimiter, line breaks and "" for a quote.
Structs§
- CsvLoader
- Parser state carried between chunks.
- CsvOptions
Enums§
- ColType
- How a field’s text becomes a value.
Functions§
- record_
pieces - Where to cut
datainto pieces of abouteveryrecords, so each piece can go to its ownCsvLoader(on its own thread) and the tables be joined in order. A cut falls only after a record’s line break, never inside a quoted field, by the same quoting rulesfeedfollows: a quote opens a quoted field only at the start of a field, so the quote in5"10is a character. Returns each piece’s start as (byte offset, line number), beginning with (0, 1); the first piece holds the header row, if any. Give the later piecesheader: falsewith the first loader’snames(), andstarting_at_linewith their line number. Field types need nothing passed:ColType::Inferdecides each value by itself, so pieces read the same values as one pass over the file.