FetchUnordered is like Fetch, but if o's root vector is dynamic, FetchUnordered returns the underlying values vectors instead of a vector.Dynamic.
(vecs []vector.Any, sctx *super.Context, projection field.Projection)
| 68 | // FetchUnordered returns the underlying values vectors instead of a |
| 69 | // vector.Dynamic. |
| 70 | func (o *Object) FetchUnordered(vecs []vector.Any, sctx *super.Context, projection field.Projection) ([]vector.Any, error) { |
| 71 | cctx := o.object.Context() |
| 72 | o.root = newShadow(cctx, o.object.Root()) |
| 73 | o.root.unmarshal(cctx, projection) |
| 74 | loader := &loader{cctx: cctx, sctx: sctx, r: o.object.DataReader()} |
| 75 | if d, ok := o.root.(*dynamic); ok { |
| 76 | return d.projectUnordered(vecs, loader, projection), nil |
| 77 | } |
| 78 | vec, err := loader.load(projection, o.root) |
| 79 | if err != nil { |
| 80 | return nil, err |
| 81 | } |
| 82 | return append(vecs, vec), nil |
| 83 | } |
no test coverage detected