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

Method OnlyIDX

ent/setting_query.go:152–158  ·  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

150
151// OnlyIDX is like OnlyID, but panics if an error occurs.
152func (sq *SettingQuery) OnlyIDX(ctx context.Context) int {
153 id, err := sq.OnlyID(ctx)
154 if err != nil {
155 panic(err)
156 }
157 return id
158}
159
160// All executes the query and returns a list of Settings.
161func (sq *SettingQuery) All(ctx context.Context) ([]*Setting, error) {

Callers

nothing calls this directly

Calls 1

OnlyIDMethod · 0.95

Tested by

no test coverage detected