MCPcopy Create free account
hub / github.com/auxten/postgresql-parser / WriteAll

Method WriteAll

pkg/util/encoding/csv/writer.go:123–131  ·  view source on GitHub ↗

WriteAll writes multiple CSV records to w using Write and then calls Flush.

(records [][]string)

Source from the content-addressed store, hash-verified

121
122// WriteAll writes multiple CSV records to w using Write and then calls Flush.
123func (w *Writer) WriteAll(records [][]string) error {
124 for _, record := range records {
125 err := w.Write(record)
126 if err != nil {
127 return err
128 }
129 }
130 return w.w.Flush()
131}
132
133// fieldNeedsQuotes reports whether our field must be enclosed in quotes.
134// Fields with a Comma, fields with a quote or newline, and

Callers

nothing calls this directly

Calls 2

WriteMethod · 0.95
FlushMethod · 0.80

Tested by

no test coverage detected