MCPcopy Index your code
hub / github.com/cloudreve/cloudreve / IDs

Method IDs

ent/setting_query.go:180–189  ·  view source on GitHub ↗

IDs executes the query and returns a list of Setting IDs.

(ctx context.Context)

Source from the content-addressed store, hash-verified

178
179// IDs executes the query and returns a list of Setting IDs.
180func (sq *SettingQuery) IDs(ctx context.Context) (ids []int, err error) {
181 if sq.ctx.Unique == nil && sq.path != nil {
182 sq.Unique(true)
183 }
184 ctx = setContextOp(ctx, sq.ctx, "IDs")
185 if err = sq.Select(setting.FieldID).Scan(ctx, &ids); err != nil {
186 return nil, err
187 }
188 return ids, nil
189}
190
191// IDsX is like IDs, but panics if an error occurs.
192func (sq *SettingQuery) IDsX(ctx context.Context) []int {

Callers 3

IDsXMethod · 0.95
FirstIDMethod · 0.45
OnlyIDMethod · 0.45

Calls 4

UniqueMethod · 0.95
SelectMethod · 0.95
setContextOpFunction · 0.85
ScanMethod · 0.45

Tested by

no test coverage detected