woodpecker/store/datastore/sql/postgres/files/counts.sql
2018-05-02 09:45:05 -07:00

14 lines
215 B
SQL

-- name: count-users
SELECT reltuples
FROM pg_class WHERE relname = 'users'
-- name: count-repos
SELECT count(1)
FROM repos
WHERE repo_active = true
-- name: count-builds
SELECT currval('builds_build_id_seq');