r8942: add :query to sql recording, support describe-table
[clsql.git] / base / transaction.lisp
index 9a914551d74c0db051499fadcd1594708e5655c3..da03282c811ce3e644b1adbd7aed8689fdd81aa3 100644 (file)
@@ -1,7 +1,16 @@
 ;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*-
 ;;;; *************************************************************************
 ;;;;
-;;;; $Id: transactions.lisp 7061 2003-09-07 06:34:45Z kevin $
+;;;; $Id$
+;;;;
+;;;; Transaction support
+;;;;
+;;;; This file is part of CLSQL.
+;;;;
+;;;; CLSQL users are granted the rights to distribute and use this software
+;;;; as governed by the terms of the Lisp Lesser GNU Public License
+;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
+;;;; *************************************************************************
 
 (in-package #:clsql-base-sys)
 
   (when (transaction database)
     (push rollback-hook (rollback-hooks (transaction database)))))
 
-(defmethod database-start-transaction ((database closed-database))
-  (signal-closed-database-error database))
-
 (defmethod database-start-transaction (database)
-  (unless database (error 'clsql-nodb-error))
+  (unless database (error 'clsql-no-database-error))
   (unless (transaction database)
     (setf (transaction database) (make-instance 'transaction)))
   (when (= (incf (transaction-level database) 1))
@@ -37,9 +43,6 @@
             (transaction-status transaction) nil)
       (execute-command "BEGIN" :database database))))
 
-(defmethod database-commit-transaction ((database closed-database))
-  (signal-closed-database-error database))
-
 (defmethod database-commit-transaction (database)
     (if (> (transaction-level database) 0)
         (when (zerop (decf (transaction-level database)))
@@ -49,9 +52,6 @@
               :format-control "Cannot commit transaction against ~A because there is no transaction in progress."
               :format-arguments (list database))))
 
-(defmethod database-abort-transaction ((database closed-database))
-  (signal-closed-database-error database))
-
 (defmethod database-abort-transaction (database)
     (if (> (transaction-level database) 0)
         (when (zerop (decf (transaction-level database)))