MCPcopy Create free account
hub / github.com/cloudreve/cloudreve / OnlyIDX

Method OnlyIDX

ent/user_query.go:369–375  ·  view source on GitHub ↗

OnlyIDX is like OnlyID, but panics if an error occurs.

(ctx context.Context)

Source from the content-addressed store, hash-verified

367
368// OnlyIDX is like OnlyID, but panics if an error occurs.
369func (uq *UserQuery) OnlyIDX(ctx context.Context) int {
370 id, err := uq.OnlyID(ctx)
371 if err != nil {
372 panic(err)
373 }
374 return id
375}
376
377// All executes the query and returns a list of Users.
378func (uq *UserQuery) All(ctx context.Context) ([]*User, error) {

Callers

nothing calls this directly

Calls 1

OnlyIDMethod · 0.95

Tested by

no test coverage detected