MCPcopy Create free account
hub / github.com/efectn/go-orm-benchmarks / All

Method All

bench/ent/model_query.go:161–168  ·  view source on GitHub ↗

All executes the query and returns a list of Models.

(ctx context.Context)

Source from the content-addressed store, hash-verified

159
160// All executes the query and returns a list of Models.
161func (mq *ModelQuery) All(ctx context.Context) ([]*Model, error) {
162 ctx = setContextOp(ctx, mq.ctx, "All")
163 if err := mq.prepareQuery(ctx); err != nil {
164 return nil, err
165 }
166 qr := querierAll[[]*Model, *ModelQuery]()
167 return withInterceptors[[]*Model](ctx, mq, qr, mq.inters)
168}
169
170// AllX is like All, but panics if an error occurs.
171func (mq *ModelQuery) AllX(ctx context.Context) []*Model {

Callers 8

AllXMethod · 0.95
ReadSliceMethod · 0.45
ReadSliceMethod · 0.45
ReadSliceMethod · 0.45
ReadSliceMethod · 0.45
ReadSliceMethod · 0.45
FirstMethod · 0.45
OnlyMethod · 0.45

Calls 4

prepareQueryMethod · 0.95
setContextOpFunction · 0.85
querierAllFunction · 0.85
withInterceptorsFunction · 0.85

Tested by

no test coverage detected