guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: cuirass: Allow filter-only searches.


From: Mathieu Othacehe
Subject: branch master updated: cuirass: Allow filter-only searches.
Date: Thu, 19 Aug 2021 10:43:21 -0400

This is an automated email from the git hooks/post-receive script.

mothacehe pushed a commit to branch master
in repository guix-cuirass.

The following commit(s) were added to refs/heads/master by this push:
     new 082a477  cuirass: Allow filter-only searches.
082a477 is described below

commit 082a477989cd6246a02c3e2ee661536ccc77cddb
Author: Sarah Morgensen <iskarian@mgsn.dev>
AuthorDate: Wed Aug 18 10:37:39 2021 -0700

    cuirass: Allow filter-only searches.
    
    If there are non-query search filters and there is no query, assume a
    wildcard query.
    
    * src/cuirass/database.scm (query->bind-arguments): Add a wildcard query
    if there are other filters and no query.
    
    Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
---
 src/cuirass/database.scm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/cuirass/database.scm b/src/cuirass/database.scm
index 0aa3f0b..2aa99a1 100644
--- a/src/cuirass/database.scm
+++ b/src/cuirass/database.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
 ;;; Copyright © 2018 Tatiana Sholokhova <tanja201396@gmail.com>
 ;;; Copyright © 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
 ;;;
 ;;; This file is part of Cuirass.
 ;;;
@@ -1060,7 +1061,11 @@ DELETE FROM Checkouts WHERE evaluation=" eval-id ";")))
             (if (assq key acc)
                 acc
                 (cons (cons key #f) acc)))
-          args '(#:spec #:system))))
+          (if (or (assq-ref args #:query)
+                  (null? (alist-delete #:query args)))
+              args
+              (cons '(#:query . "%") args))
+          '(#:spec #:system))))
 
 (define (db-get-build-products build-id)
   "Return the build products associated to the given BUILD-ID."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]