aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Othacehe <m.othacehe@gmail.com>2017-07-12 10:03:31 +0200
committerMathieu Othacehe <m.othacehe@gmail.com>2017-07-12 16:28:41 +0200
commit707b053024ec9d50699312f09f69743a9559f5e5 (patch)
tree84849eb0c6759f1fbff60adaf8ecf5c4cd876491
parent56ac3e24ac52d6129737179ec55396dc259fca4c (diff)
downloadcuirass-707b053024ec9d50699312f09f69743a9559f5e5.tar
cuirass-707b053024ec9d50699312f09f69743a9559f5e5.tar.gz
database: Fix typo.
* src/cuirass/database.scm (db-get-stamp, db-add-stamp): Replace #:id by #:name. There is no #:id in specifications. Plus, the primary key of Specifications is #:name.
-rw-r--r--src/cuirass/database.scm6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cuirass/database.scm b/src/cuirass/database.scm
index 1ced411..804b8c2 100644
--- a/src/cuirass/database.scm
+++ b/src/cuirass/database.scm
@@ -195,7 +195,7 @@ INSERT INTO Builds (derivation, evaluation, log, output)\
(define (db-get-stamp db spec)
"Return a stamp corresponding to specification SPEC in database DB."
(let ((res (sqlite-exec db "SELECT * FROM Stamps WHERE specification='~A';"
- (assq-ref spec #:id))))
+ (assq-ref spec #:name))))
(match res
(() "")
((#(spec commit)) commit))))
@@ -205,9 +205,9 @@ INSERT INTO Builds (derivation, evaluation, log, output)\
(if (string-null? (db-get-stamp db spec))
(sqlite-exec db "\
INSERT INTO Stamps (specification, stamp) VALUES ('~A', '~A');"
- (assq-ref spec #:id)
+ (assq-ref spec #:name)
commit)
(sqlite-exec db "\
UPDATE Stamps SET stamp='~A' WHERE specification='~A';"
commit
- (assq-ref spec #:id))))
+ (assq-ref spec #:name))))