ks-transaction added.

This commit is contained in:
2026-06-29 09:15:19 +02:00
parent 6f5ef123f9
commit 156177cd5d
2 changed files with 11 additions and 1 deletions
+3 -1
View File
@@ -108,7 +108,9 @@
(define-syntax ks-transaction
(syntax-rules ()
((_ ks b1 ...)
(begin
(with-handlers ([exn? (λ (e)
(query-exec (keystore-dbh ks) "ROLLBACK")
(raise e))])
(query-exec (keystore-dbh ks) "BEGIN")
(let ((r (begin b1 ...)))
(query-exec (keystore-dbh ks) "COMMIT")