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

Method FirstX

ent/nodeversion_query.go:152–158  ·  view source on GitHub ↗

FirstX is like First, but panics if an error occurs.

(ctx context.Context)

Source from the content-addressed store, hash-verified

150
151// FirstX is like First, but panics if an error occurs.
152func (nvq *NodeVersionQuery) FirstX(ctx context.Context) *NodeVersion {
153 node, err := nvq.First(ctx)
154 if err != nil && !IsNotFound(err) {
155 panic(err)
156 }
157 return node
158}
159
160// FirstID returns the first NodeVersion ID from the query.
161// Returns a *NotFoundError when no NodeVersion ID was found.

Callers

nothing calls this directly

Calls 2

FirstMethod · 0.95
IsNotFoundFunction · 0.85

Tested by

no test coverage detected