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

Function countAllRows

plugins/destination/sqlite/client/delete_test.go:76–88  ·  view source on GitHub ↗
(ctx context.Context, client *Client, table *schema.Table)

Source from the content-addressed store, hash-verified

74}
75
76func countAllRows(ctx context.Context, client *Client, table *schema.Table) (int64, error) {
77 var err error
78 ch := make(chan arrow.RecordBatch)
79 go func() {
80 defer close(ch)
81 err = client.Read(ctx, table, ch)
82 }()
83 count := int64(0)
84 for record := range ch {
85 count += record.NumRows()
86 }
87 return count, err
88}
89
90func withPluginClient(ctx context.Context, r *require.Assertions) *Client {
91 s := &Spec{ConnectionString: ":memory:"}

Callers 1

TestDeleteFunction · 0.70

Calls 1

ReadMethod · 0.45

Tested by

no test coverage detected