aboutsummaryrefslogtreecommitdiff
path: root/guix-data-service/model/package.scm
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-09-04 19:28:48 +0200
committerChristopher Baines <mail@cbaines.net>2019-09-05 16:07:23 +0200
commit1a55022524043bdf2f120dd38990d42949ecb6e2 (patch)
treebe78a6ade65501dfa4563214f7fb60766eaea746 /guix-data-service/model/package.scm
parentf29230e034bd9d7ae201901efee18a166c966ea5 (diff)
downloaddata-service-1a55022524043bdf2f120dd38990d42949ecb6e2.tar
data-service-1a55022524043bdf2f120dd38990d42949ecb6e2.tar.gz
Improve the package and package-metadata modules
Add tests around the package module, extract out the use of the inferior-package record assessors so that they aren't part of the tests, and switch across the package-metadata module to use insert-missing-data-and-return-all-ids.
Diffstat (limited to 'guix-data-service/model/package.scm')
-rw-r--r--guix-data-service/model/package.scm11
1 files changed, 1 insertions, 10 deletions
diff --git a/guix-data-service/model/package.scm b/guix-data-service/model/package.scm
index 477a25c..49ebab0 100644
--- a/guix-data-service/model/package.scm
+++ b/guix-data-service/model/package.scm
@@ -9,7 +9,6 @@
select-packages-in-revision
search-packages-in-revision
count-packages-in-revision
- insert-into-package-entries
inferior-packages->package-ids))
(define (select-existing-package-entries package-entries)
@@ -160,15 +159,7 @@ WHERE packages.id IN (
" RETURNING id"
";"))
-(define (inferior-packages->package-ids conn packages metadata-ids)
- (define package-entries
- (map (lambda (package metadata-id)
- (list (inferior-package-name package)
- (inferior-package-version package)
- metadata-id))
- packages
- metadata-ids))
-
+(define (inferior-packages->package-ids conn package-entries)
(insert-missing-data-and-return-all-ids
conn
"packages"