MCPcopy Index your code
hub / github.com/dreamsofcode-io/zenstats / CountVisitors

Method CountVisitors

internal/repository/visits.sql.go:28–33  ·  view source on GitHub ↗
(ctx context.Context, visitedAt time.Time)

Source from the content-addressed store, hash-verified

26`
27
28func (q *Queries) CountVisitors(ctx context.Context, visitedAt time.Time) (int64, error) {
29 row := q.db.QueryRow(ctx, countVisitors, visitedAt)
30 var count int64
31 err := row.Scan(&count)
32 return count, err
33}
34
35const insertVisit = `-- name: InsertVisit :exec
36INSERT INTO visit (ip, visited_at) VALUES (($1::varchar)::inet, now())

Callers 1

ServeHTTPMethod · 0.80

Calls 1

QueryRowMethod · 0.80

Tested by

no test coverage detected