MCPcopy Create free account
hub / github.com/brimdata/super / BatchifyPools

Method BatchifyPools

db/root.go:185–203  ·  view source on GitHub ↗
(ctx context.Context, sctx *super.Context, f expr.Evaluator)

Source from the content-addressed store, hash-verified

183}
184
185func (r *Root) BatchifyPools(ctx context.Context, sctx *super.Context, f expr.Evaluator) ([]super.Value, error) {
186 m := sup.NewBSUPMarshalerWithContext(sctx)
187 m.Decorate(sup.StylePackage)
188 pools, err := r.ListPools(ctx)
189 if err != nil {
190 return nil, err
191 }
192 var vals []super.Value
193 for k := range pools {
194 rec, err := m.Marshal(&pools[k])
195 if err != nil {
196 return nil, err
197 }
198 if filter(sctx, rec, f) {
199 vals = append(vals, rec)
200 }
201 }
202 return vals, nil
203}
204
205func (r *Root) BatchifyBranches(ctx context.Context, sctx *super.Context, f expr.Evaluator) ([]super.Value, error) {
206 m := sup.NewBSUPMarshalerWithContext(sctx)

Callers 1

NewDBMetaScannerFunction · 0.80

Calls 5

ListPoolsMethod · 0.95
filterFunction · 0.70
DecorateMethod · 0.45
MarshalMethod · 0.45

Tested by

no test coverage detected