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

Method Next

core/dataloader/csvdataloader.go:180–194  ·  view source on GitHub ↗
(ctx *sql.Context)

Source from the content-addressed store, hash-verified

178}
179
180func (c csvRowIter) Next(ctx *sql.Context) (sql.Row, error) {
181 row, hasNext, err := c.cdl.nextRow(ctx, c.reader)
182 if err != nil {
183 return nil, err
184 }
185
186 // TODO: this isn't the best way to handle the count of rows, something like a RowUpdateAccumulator would be better
187 if hasNext {
188 c.cdl.results.RowsLoaded++
189 } else {
190 return nil, io.EOF
191 }
192
193 return row, nil
194}
195
196func (c csvRowIter) Close(context *sql.Context) error {
197 return nil

Callers

nothing calls this directly

Calls 1

nextRowMethod · 0.45

Tested by

no test coverage detected