MCPcopy Create free account
hub / github.com/dolthub/doltgresql / NewCsvReader

Function NewCsvReader

core/dataloader/csvreader.go:78–80  ·  view source on GitHub ↗

NewCsvReader creates a csvReader from a given ReadCloser. The interpretation of the bytes of the supplied reader is a little murky. If there is a UTF8, UTF16LE or UTF16BE BOM as the first bytes read, then the BOM is stripped and the remaining contents of the reader are treated as that encoding. If

(r io.ReadCloser)

Source from the content-addressed store, hash-verified

76// bytes go uninterpreted until we get to the SQL layer. It is currently the
77// case that newlines must be encoded as a '0xa' byte.
78func NewCsvReader(r io.ReadCloser) (*csvReader, error) {
79 return newCsvReaderWithDelimiter(r, ",")
80}
81
82// newCsvReaderWithDelimiter creates a csvReader from a given ReadCloser, |r|, using
83// the |delimiter| as the field delimiter in the parsed data.

Callers 1

TestCsvReaderFunction · 0.92

Calls 1

Tested by 1

TestCsvReaderFunction · 0.74