(when (zerop (decf (transaction-level database)))
(execute-command "COMMIT" :database database)
(map nil #'funcall (commit-hooks (transaction database))))
(when (zerop (decf (transaction-level database)))
(execute-command "COMMIT" :database database)
(map nil #'funcall (commit-hooks (transaction database))))
:format-control "Cannot commit transaction against ~A because there is no transaction in progress."
:format-arguments (list database))))
:format-control "Cannot commit transaction against ~A because there is no transaction in progress."
:format-arguments (list database))))
(unwind-protect
(execute-command "ROLLBACK" :database database)
(map nil #'funcall (rollback-hooks (transaction database)))))
(unwind-protect
(execute-command "ROLLBACK" :database database)
(map nil #'funcall (rollback-hooks (transaction database)))))
:format-control "Cannot abort transaction against ~A because there is no transaction in progress."
:format-arguments (list database))))
:format-control "Cannot abort transaction against ~A because there is no transaction in progress."
:format-arguments (list database))))