I’m using toCsv() to serialize a list that is imported into MySQL using the “load data local infile” command
var hlist = new List<>();
load data local infile ‘/tmp/page-0.csv’
into table LocalSyncHeaders
enclosed by ’ " ’
FIELDS TERMINATED BY ‘,’
LINES TERMINATED BY ‘\n’;
The problems are:
1 - the field titles get inserted into the db as the first row
2 - it expects fields to be enclosed in double-quotes and without it stops importing
Clearly I can control some of this in MySQL.
1 - Is there any way to control ToCsv() so it can better match what MySQL expects.
2 - I see that there is an option for
are there any other control points for csv serialization?