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

Method GetByID

inventory/user.go:354–356  ·  view source on GitHub ↗
(ctx context.Context, id int)

Source from the content-addressed store, hash-verified

352}
353
354func (c *userClient) GetByID(ctx context.Context, id int) (*ent.User, error) {
355 return withUserEagerLoading(ctx, c.client.User.Query().Where(user.ID(id))).First(ctx)
356}
357
358func (c *userClient) GetActiveByID(ctx context.Context, id int) (*ent.User, error) {
359 return withUserEagerLoading(

Callers

nothing calls this directly

Calls 5

IDFunction · 0.92
withUserEagerLoadingFunction · 0.85
FirstMethod · 0.45
WhereMethod · 0.45
QueryMethod · 0.45

Tested by

no test coverage detected