emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/triples cc5629fe5c 07/19: Wrap all database access in `


From: ELPA Syncer
Subject: [elpa] externals/triples cc5629fe5c 07/19: Wrap all database access in `triples-set-types' in a transaction.
Date: Sat, 5 Nov 2022 11:58:16 -0400 (EDT)

branch: externals/triples
commit cc5629fe5cad5a8df67befa5fd65e20d90564345
Author: Andrew Hyatt <ahyatt@gmail.com>
Commit: Andrew Hyatt <ahyatt@gmail.com>

    Wrap all database access in `triples-set-types' in a transaction.
---
 triples.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/triples.el b/triples.el
index c825bf0000..95cbbe0f2d 100644
--- a/triples.el
+++ b/triples.el
@@ -181,8 +181,9 @@ given in the COMBINED-PROPS will be removed."
                   (plist-put (gethash (triples--decolon type) type-to-plist)
                              (triples--encolon prop) val) type-to-plist)))
      combined-props)
-    (cl-loop for k being the hash-keys of type-to-plist using (hash-values v)
-             do (apply #'triples-set-type db subject k v))))
+    (emacsql-with-transaction db
+      (cl-loop for k being the hash-keys of type-to-plist using (hash-values v)
+               do (apply #'triples-set-type db subject k v)))))
 
 (defun triples--set-type-op (subject type properties)
   "Create operation to replace PROPERTIES for TYPE for SUBJECT.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]