(database *default-database*))
"Adds COMMIT-HOOK, which should a designator for a function
with no required arguments, to the list of hooks run when COMMIT
(database *default-database*))
"Adds COMMIT-HOOK, which should a designator for a function
with no required arguments, to the list of hooks run when COMMIT
&key (database *default-database*))
"Adds ROLLBACK-HOOK, which should a designator for a function
with no required arguments, to the list of hooks run when ROLLBACK
&key (database *default-database*))
"Adds ROLLBACK-HOOK, which should a designator for a function
with no required arguments, to the list of hooks run when ROLLBACK
(make-instance 'transaction :previous-autocommit
(database-autocommit database))))
(setf (database-autocommit database) nil)
(make-instance 'transaction :previous-autocommit
(database-autocommit database))))
(setf (database-autocommit database) nil)
(let ((transaction (transaction database)))
(setf (commit-hooks transaction) nil
(rollback-hooks transaction) nil
(let ((transaction (transaction database)))
(setf (commit-hooks transaction) nil
(rollback-hooks transaction) nil
(with-slots (transaction transaction-level autocommit) database
(if (plusp transaction-level)
(when (zerop (decf transaction-level))
(with-slots (transaction transaction-level autocommit) database
(if (plusp transaction-level)
(when (zerop (decf transaction-level))
(execute-command "ROLLBACK" :database database)
(setf autocommit (previous-autocommit transaction))
(map nil #'funcall (rollback-hooks transaction))))
(execute-command "ROLLBACK" :database database)
(setf autocommit (previous-autocommit transaction))
(map nil #'funcall (rollback-hooks transaction))))
currently within the scope of a transaction, commits changes made
since the transaction began."
(database-commit-transaction database)
currently within the scope of a transaction, commits changes made
since the transaction began."
(database-commit-transaction database)
(defun rollback (&key (database *default-database*))
"If DATABASE, which defaults to *DEFAULT-DATABASE*, is
currently within the scope of a transaction, rolls back changes
made since the transaction began."
(database-abort-transaction database)
(defun rollback (&key (database *default-database*))
"If DATABASE, which defaults to *DEFAULT-DATABASE*, is
currently within the scope of a transaction, rolls back changes
made since the transaction began."
(database-abort-transaction database)
(defun start-transaction (&key (database *default-database*))
"Starts a transaction block on DATABASE which defaults to
(defun start-transaction (&key (database *default-database*))
"Starts a transaction block on DATABASE which defaults to