This method renders the entire table into a single string, encoded as CSV.
This method renders the entire table into a single string, encoded as CSV.
In the future we may want something Stream-based, but for now the method seems to be "fast enough" for our purposes.
The column headers are currently stringified CPaths. These are introduced introduced slice-by-slice in alphabetical order. So if there is one slice, the headers will be totally alphabetical. If two slices, the alphabetized headers from the first slice are first, and then the other headers (also alphabetized). And so on.
The escaping here should match Microsoft's:
If a value contains commas, double-quotes, or CR/LF, it will be escaped. To escape a value, it is wrapped in double quotes. Any double-quotes in the value are themselves doubled. So:
the fox said: "hello, my name is fred."
becomes:
"the fox said: ""hello, my name is fred."""