(ctx context.Context, sctx *super.Context, f expr.Evaluator)
| 190 | } |
| 191 | |
| 192 | func (p *Pool) BatchifyBranchTips(ctx context.Context, sctx *super.Context, f expr.Evaluator) ([]super.Value, error) { |
| 193 | branches, err := p.ListBranches(ctx) |
| 194 | if err != nil { |
| 195 | return nil, err |
| 196 | } |
| 197 | m := sup.NewBSUPMarshalerWithContext(sctx) |
| 198 | m.Decorate(sup.StylePackage) |
| 199 | recs := make([]super.Value, 0, len(branches)) |
| 200 | for _, branchRef := range branches { |
| 201 | rec, err := m.Marshal(&BranchTip{branchRef.Name, branchRef.Commit}) |
| 202 | if err != nil { |
| 203 | return nil, err |
| 204 | } |
| 205 | if filter(sctx, rec, f) { |
| 206 | recs = append(recs, rec) |
| 207 | } |
| 208 | } |
| 209 | return recs, nil |
| 210 | } |
| 211 | |
| 212 | // XXX this is inefficient but is only meant for interactive queries...? |
| 213 | func (p *Pool) ObjectExists(ctx context.Context, id ksuid.KSUID) (bool, error) { |
no test coverage detected