MCPcopy Create free account
hub / github.com/Comfy-Org/registry-backend / FirstIDX

Method FirstIDX

ent/node_query.go:173–179  ·  view source on GitHub ↗

FirstIDX is like FirstID, but panics if an error occurs.

(ctx context.Context)

Source from the content-addressed store, hash-verified

171
172// FirstIDX is like FirstID, but panics if an error occurs.
173func (nq *NodeQuery) FirstIDX(ctx context.Context) string {
174 id, err := nq.FirstID(ctx)
175 if err != nil && !IsNotFound(err) {
176 panic(err)
177 }
178 return id
179}
180
181// Only returns a single Node entity found by the query, ensuring it only returns one.
182// Returns a *NotSingularError when more than one Node entity is found.

Callers

nothing calls this directly

Calls 2

FirstIDMethod · 0.95
IsNotFoundFunction · 0.85

Tested by

no test coverage detected