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

Method CountEntityByTimeRange

inventory/file.go:354–360  ·  view source on GitHub ↗
(ctx context.Context, start, end *time.Time)

Source from the content-addressed store, hash-verified

352}
353
354func (f *fileClient) CountEntityByTimeRange(ctx context.Context, start, end *time.Time) (int, error) {
355 if start == nil || end == nil {
356 return f.client.Entity.Query().Count(ctx)
357 }
358
359 return f.client.Entity.Query().Where(entity.CreatedAtGTE(*start), entity.CreatedAtLT(*end)).Count(ctx)
360}
361
362func (f *fileClient) CountEntityByStoragePolicyID(ctx context.Context, storagePolicyID int) (int, int, error) {
363 var v []struct {

Callers

nothing calls this directly

Calls 5

CreatedAtGTEFunction · 0.92
CreatedAtLTFunction · 0.92
CountMethod · 0.65
QueryMethod · 0.45
WhereMethod · 0.45

Tested by

no test coverage detected