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

Method OnlyIDX

ent/node_query.go:177–183  ·  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

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

Callers

nothing calls this directly

Calls 1

OnlyIDMethod · 0.95

Tested by

no test coverage detected