MCPcopy Create free account
hub / github.com/an0nfunc/ALHP / FirstIDX

Method FirstIDX

ent/dbpackage_query.go:99–105  ·  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

97
98// FirstIDX is like FirstID, but panics if an error occurs.
99func (_q *DBPackageQuery) FirstIDX(ctx context.Context) int {
100 id, err := _q.FirstID(ctx)
101 if err != nil && !IsNotFound(err) {
102 panic(err)
103 }
104 return id
105}
106
107// Only returns a single DBPackage entity found by the query, ensuring it only returns one.
108// Returns a *NotSingularError when more than one DBPackage entity is found.

Callers

nothing calls this directly

Calls 2

FirstIDMethod · 0.95
IsNotFoundFunction · 0.85

Tested by

no test coverage detected