[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/06: Make with-postgresql-connection work with multiple values
From: |
Christopher Baines |
Subject: |
04/06: Make with-postgresql-connection work with multiple values |
Date: |
Fri, 2 Oct 2020 15:15:40 -0400 (EDT) |
cbaines pushed a commit to branch master
in repository data-service.
commit 71afa939816a3f7d53cce91d00fc1110125f18fe
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Fri Oct 2 20:11:07 2020 +0100
Make with-postgresql-connection work with multiple values
---
guix-data-service/database.scm | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/guix-data-service/database.scm b/guix-data-service/database.scm
index 60115ad..2ac26c4 100644
--- a/guix-data-service/database.scm
+++ b/guix-data-service/database.scm
@@ -65,9 +65,12 @@
(with-throw-handler
#t
(lambda ()
- (let ((result (f conn)))
- (pg-conn-finish conn)
- result))
+ (call-with-values
+ (lambda ()
+ (f conn))
+ (lambda vals
+ (pg-conn-finish conn)
+ (apply values vals))))
(lambda (key . args)
(pg-conn-finish conn)))))
- branch master updated (6e0e33a -> 470573b), Christopher Baines, 2020/10/02
- 02/06: Reformat lint warning related query, Christopher Baines, 2020/10/02
- 01/06: Speed up a query for derivation builds, Christopher Baines, 2020/10/02
- 05/06: Add an index for derivation_sources.derivation_source_file_id, Christopher Baines, 2020/10/02
- 04/06: Make with-postgresql-connection work with multiple values,
Christopher Baines <=
- 06/06: Delete derivation_source_files that are unreferenced, Christopher Baines, 2020/10/02
- 03/06: Change a constraint to add ON DELETE CASCADE, Christopher Baines, 2020/10/02