branch: externals/triples commit cc5629fe5cad5a8df67befa5fd65e20d90564345 Author: Andrew Hyatt <ahy...@gmail.com> Commit: Andrew Hyatt <ahy...@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.