diff options
-rw-r--r-- | src/cuirass/database.scm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cuirass/database.scm b/src/cuirass/database.scm index 8ce4153..d8d1ed2 100644 --- a/src/cuirass/database.scm +++ b/src/cuirass/database.scm @@ -21,6 +21,7 @@ #:use-module (ice-9 rdelim) #:use-module (sqlite3) #:export (;; Procedures. + assq-refs db-init db-open db-close @@ -93,6 +94,10 @@ database object." "Close database object DB." (sqlite-close db)) +(define* (assq-refs alst keys #:optional default-value) + (map (λ (key) (or (assq-ref alst key) default-value)) + keys)) + (define (db-add-evaluation db job) "Store a derivation result in database DB and return its ID." (sqlite-exec db "insert into build (job_spec, drv) values ('~A', '~A');" |