MCPcopy Index your code
hub / github.com/cloudreve/cloudreve / OnlyIDX

Method OnlyIDX

ent/metadata_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 (mq *MetadataQuery) OnlyIDX(ctx context.Context) int {
177 id, err := mq.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 MetadataSlice.
185func (mq *MetadataQuery) All(ctx context.Context) ([]*Metadata, error) {

Callers

nothing calls this directly

Calls 1

OnlyIDMethod · 0.95

Tested by

no test coverage detected