Add a function to check how many repositories have x_git_repo_header

This commit is contained in:
Christopher Baines 2020-02-01 13:59:41 +01:00
parent 744ab9366b
commit 671a85f798

View file

@ -22,6 +22,7 @@
#:export (all-git-repositories
select-git-repository
git-repository-id->url
count-git-repositories-with-x-git-repo-header-values
git-repository-x-git-repo-header->git-repository-id
git-repository-url->git-repository-id
git-repositories-containing-commit
@ -60,6 +61,13 @@
(list id))
(((url)) url)))
(define (count-git-repositories-with-x-git-repo-header-values conn)
(match (exec-query
conn
"SELECT COUNT(*) FROM git_repositories WHERE x_git_repo_header IS NOT NULL")
(((count))
(string->number count))))
(define (git-repository-x-git-repo-header->git-repository-id conn header)
(match
(exec-query