X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=sql%2Fsql.cl;fp=sql%2Fsql.cl;h=529925dfed98a1600b28ad67b5c28892a0cf3a41;hb=0384597fcf4fdc8b05c48596798606ea5dc58146;hp=2d8ab3f239e6aac3035173992c0ab426b9d2f77e;hpb=30656549f102f19d3cedba9e2b6e30fc763ea20d;p=clsql.git diff --git a/sql/sql.cl b/sql/sql.cl index 2d8ab3f..529925d 100644 --- a/sql/sql.cl +++ b/sql/sql.cl @@ -8,7 +8,7 @@ ;;;; Original code by Pierre R. Mai ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: sql.cl,v 1.8 2002/03/29 07:42:10 kevin Exp $ +;;;; $Id: sql.cl,v 1.9 2002/03/29 08:12:16 kevin Exp $ ;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; and Copyright (c) 1999-2001 by Pierre R. Mai @@ -73,35 +73,7 @@ initialized, as indicated by `*initialized-database-types*'." (defvar *default-database* nil "Specifies the default database to be used.") -(defclass database () - ((name :initarg :name :reader database-name)) - (:documentation - "This class is the supertype of all databases handled by CLSQL.")) - -(defmethod print-object ((object database) stream) - (print-unreadable-object (object stream :type t :identity t) - (write-string (if (slot-boundp object 'name) - (database-name object) - "") - stream))) - -(defclass closed-database () - ((name :initarg :name :reader database-name)) - (:documentation - "This class represents all databases after they are closed via -`disconnect'.")) - -(defmethod print-object ((object closed-database) stream) - (print-unreadable-object (object stream :type t :identity t) - (write-string (if (slot-boundp object 'name) - (database-name object) - "") - stream))) - -(defun signal-closed-database-error (database) - (cerror "Ignore this error and return nil." - 'clsql-closed-error - :database database)) + (defun find-database (database &optional (errorp t)) (etypecase database