aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-02-12 08:38:05 +0000
committerChristopher Baines <mail@cbaines.net>2020-02-12 08:38:05 +0000
commit1c34e07e8448f67dc26f3de6e21c8e55e9131e5d (patch)
treef0e13a261e2bff5a44a53f7693302fb7b45ca459
parent5cf186e5b1bcc8f942ad15a31dc67590bc9bf999 (diff)
downloaddata-service-1c34e07e8448f67dc26f3de6e21c8e55e9131e5d.tar
data-service-1c34e07e8448f67dc26f3de6e21c8e55e9131e5d.tar.gz
Query for builds for channel instance derivations
-rw-r--r--guix-data-service/builds.scm17
1 files changed, 17 insertions, 0 deletions
diff --git a/guix-data-service/builds.scm b/guix-data-service/builds.scm
index 35a0c61..4fbc105 100644
--- a/guix-data-service/builds.scm
+++ b/guix-data-service/builds.scm
@@ -484,6 +484,23 @@ WHERE NOT EXISTS (
(string-join (map quote-string revision-commits) ",")
")"))
"
+ UNION ALL
+ SELECT derivations_by_output_details_set.derivation_output_details_set_id
+ FROM channel_instances
+ INNER JOIN derivations_by_output_details_set
+ ON channel_instances.derivation_id =
+ derivations_by_output_details_set.derivation_id
+ INNER JOIN guix_revisions
+ ON guix_revisions.id = channel_instances.guix_revision_id
+"
+ (if (null? revision-commits)
+ ""
+ (string-append
+ "
+ WHERE guix_revisions.commit IN ("
+ (string-join (map quote-string revision-commits) ",")
+ ")"))
+ "
)
ORDER BY derivation_output_details_sets.id, derivation_output_details.id
LIMIT 15000"))