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

Method OnlyIDX

ent/share_query.go:201–207  ·  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

199
200// OnlyIDX is like OnlyID, but panics if an error occurs.
201func (sq *ShareQuery) OnlyIDX(ctx context.Context) int {
202 id, err := sq.OnlyID(ctx)
203 if err != nil {
204 panic(err)
205 }
206 return id
207}
208
209// All executes the query and returns a list of Shares.
210func (sq *ShareQuery) All(ctx context.Context) ([]*Share, error) {

Callers

nothing calls this directly

Calls 1

OnlyIDMethod · 0.95

Tested by

no test coverage detected