MCPcopy Create free account
hub / github.com/cloudquery/cloudquery / readAll

Function readAll

plugins/destination/file/client/client_test.go:227–240  ·  view source on GitHub ↗
(ctx context.Context, client plugin.Client, table *schema.Table)

Source from the content-addressed store, hash-verified

225}
226
227func readAll(ctx context.Context, client plugin.Client, table *schema.Table) ([]arrow.RecordBatch, error) {
228 var err error
229 ch := make(chan arrow.RecordBatch)
230 go func() {
231 defer close(ch)
232 err = client.Read(ctx, table, ch)
233 }()
234 // nolint:prealloc
235 var records []arrow.RecordBatch
236 for record := range ch {
237 records = append(records, record)
238 }
239 return records, err
240}

Callers 1

testPluginCustomFunction · 0.70

Calls 1

ReadMethod · 0.45

Tested by

no test coverage detected