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

Method OnlyIDX

ent/task_query.go:176–182  ·  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

174
175// OnlyIDX is like OnlyID, but panics if an error occurs.
176func (tq *TaskQuery) OnlyIDX(ctx context.Context) int {
177 id, err := tq.OnlyID(ctx)
178 if err != nil {
179 panic(err)
180 }
181 return id
182}
183
184// All executes the query and returns a list of Tasks.
185func (tq *TaskQuery) All(ctx context.Context) ([]*Task, error) {

Callers

nothing calls this directly

Calls 1

OnlyIDMethod · 0.95

Tested by

no test coverage detected