Repository navigation
v1.7.0
Write a sentinel for a null, so a file can round-trip its nulls.
New
CsvConfig(nullPlaceholder: 'NULL')writes that text for anullinstead of
an empty field. Some destinations want a sentinel: PostgresCOPYreads
\N, and plenty of exports useNULL. Paired withnullValuesthe same
file reads back with its nulls intact, which the previous release could
decode but not produce.- The placeholder is written with
necessaryquoting whateverquoteModeis
set to. It is a sentinel rather than data, and underalwaysorstringsit
would come out quoted, whichnullValuesdeliberately never matches, so the
round trip would have quietly failed. It still gets quotes when the text
itself needs them. - An empty string is untouched by all of this. It still encodes as a quoted
empty field, so''andnullstay distinguishable on the way back.