[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
10/19: database: Replace existing entries in Refs.
From: |
Ludovic Courtès |
Subject: |
10/19: database: Replace existing entries in Refs. |
Date: |
Thu, 14 Jun 2018 05:17:09 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 122a6cad7d4a7520593d1dd0c16b3bb8094d7f5a
Author: Ludovic Courtès <address@hidden>
Date: Wed Jun 6 17:14:18 2018 +0200
database: Replace existing entries in Refs.
* guix/store/database.scm (add-reference-sql): Add "OR REPLACE".
---
guix/store/database.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/guix/store/database.scm b/guix/store/database.scm
index bfd2c36..094dea3 100644
--- a/guix/store/database.scm
+++ b/guix/store/database.scm
@@ -141,7 +141,7 @@ of course. Returns the row id of the row that was modified
or inserted."
(last-insert-row-id db)))))
(define add-reference-sql
- "INSERT INTO Refs (referrer, reference) VALUES (:referrer, :reference);")
+ "INSERT OR REPLACE INTO Refs (referrer, reference) VALUES (:referrer,
:reference);")
(define (add-references db referrer references)
"REFERRER is the id of the referring store item, REFERENCES is a list
- 02/19: database: Fail registration when encountering unregistered references., (continued)
- 02/19: database: Fail registration when encountering unregistered references., Ludovic Courtès, 2018/06/14
- 08/19: database: Remove extra SQL parameter in 'update-or-insert'., Ludovic Courtès, 2018/06/14
- 05/19: database: Provide a way to specify the schema location., Ludovic Courtès, 2018/06/14
- 07/19: deduplicate: Fix a couple of thinkos., Ludovic Courtès, 2018/06/14
- 18/19: store: Remove 'register-path'., Ludovic Courtès, 2018/06/14
- 17/19: database: Allow for deterministic database construction., Ludovic Courtès, 2018/06/14
- 11/19: database: 'reset-timestamps' sets file permissions as well., Ludovic Courtès, 2018/06/14
- 03/19: store-copy: 'read-reference-graph' returns a list of records., Ludovic Courtès, 2018/06/14
- 14/19: database: 'sqlite-register' takes a database, not a file name., Ludovic Courtès, 2018/06/14
- 12/19: vm: 'expression->derivation-in-linux-vm' code can now use dlopen., Ludovic Courtès, 2018/06/14
- 10/19: database: Replace existing entries in Refs.,
Ludovic Courtès <=
- 15/19: database: Add 'register-items'., Ludovic Courtès, 2018/06/14
- 06/19: database: 'register-path' creates the database directory if needed., Ludovic Courtès, 2018/06/14
- 09/19: database: Add #:reset-timestamps? to 'register-path'., Ludovic Courtès, 2018/06/14
- 01/19: database: 'with-database' can now initialize new databases., Ludovic Courtès, 2018/06/14
- 13/19: install: Use (guix store database) instead of 'guix-register'., Ludovic Courtès, 2018/06/14
- 19/19: Remove 'guix-register' and its traces., Ludovic Courtès, 2018/06/14