MCPcopy Create free account
hub / github.com/0xUnixIO/pulse / Count

Method Count

internal/store/postgres/accesslogs.go:183–191  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

181}
182
183func (s *AccessLogStore) Count() (int64, error) {
184 ctx := context.Background()
185 var n int64
186 err := s.db.QueryRow(ctx, `SELECT COUNT(*) FROM access_logs`).Scan(&n)
187 if err != nil {
188 return 0, fmt.Errorf("count access logs: %w", err)
189 }
190 return n, nil
191}
192
193func (s *AccessLogStore) DeleteOlderThan(t time.Time) (int64, error) {
194 ctx := context.Background()

Callers

nothing calls this directly

Calls 1

QueryRowMethod · 0.80

Tested by

no test coverage detected