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

Method BatchifyBranches

db/pool.go:162–178  ·  view source on GitHub ↗
(ctx context.Context, sctx *super.Context, recs []super.Value, m *sup.MarshalBSUPContext, f expr.Evaluator)

Source from the content-addressed store, hash-verified

160}
161
162func (p *Pool) BatchifyBranches(ctx context.Context, sctx *super.Context, recs []super.Value, m *sup.MarshalBSUPContext, f expr.Evaluator) ([]super.Value, error) {
163 branches, err := p.ListBranches(ctx)
164 if err != nil {
165 return nil, err
166 }
167 for _, branchRef := range branches {
168 meta := BranchMeta{p.Config, branchRef}
169 rec, err := m.Marshal(&meta)
170 if err != nil {
171 return nil, err
172 }
173 if filter(sctx, rec, f) {
174 recs = append(recs, rec)
175 }
176 }
177 return recs, nil
178}
179
180func filter(sctx *super.Context, this super.Value, e expr.Evaluator) bool {
181 if e == nil {

Callers 2

NewDBMetaScannerFunction · 0.45
NewPoolMetaScannerFunction · 0.45

Calls 3

ListBranchesMethod · 0.95
filterFunction · 0.70
MarshalMethod · 0.45

Tested by

no test coverage detected