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

Method OnlyIDX

ent/entity_query.go:225–231  ·  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

223
224// OnlyIDX is like OnlyID, but panics if an error occurs.
225func (eq *EntityQuery) OnlyIDX(ctx context.Context) int {
226 id, err := eq.OnlyID(ctx)
227 if err != nil {
228 panic(err)
229 }
230 return id
231}
232
233// All executes the query and returns a list of Entities.
234func (eq *EntityQuery) All(ctx context.Context) ([]*Entity, error) {

Callers

nothing calls this directly

Calls 1

OnlyIDMethod · 0.95

Tested by

no test coverage detected