X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=sql%2Fdb-interface.lisp;h=9c17b544dd0268993a6022e13b3677fadb107959;hb=b9e89e0d84e8ab8d3e8d9ac02e3349bac908b415;hp=031d1e8ae7fb7b8f632acd056b398bcd288550dd;hpb=e9e1a810cd690a31c0258f1aad313aeae18a8906;p=clsql.git diff --git a/sql/db-interface.lisp b/sql/db-interface.lisp index 031d1e8..9c17b54 100644 --- a/sql/db-interface.lisp +++ b/sql/db-interface.lisp @@ -9,9 +9,7 @@ ;;;; onShoreD to support UncommonSQL front-end ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id$ -;;;; -;;;; This file, part of CLSQL, is Copyright (c) 2002-2004 by Kevin M. Rosenberg +;;;; This file, part of CLSQL, is Copyright (c) 2002-2010 by Kevin M. Rosenberg ;;;; and Copyright (c) 1999-2001 by Pierre R. Mai, and onShoreD ;;;; ;;;; CLSQL users are granted the rights to distribute and use this software @@ -374,6 +372,12 @@ of TYPE_NAME (keyword) PRECISION SCALE NULLABLE.") t) (:documentation "T [default] if database-type supports EXCEPT.")) +(defgeneric db-type-has-auto-increment? (db-type) + (:method (db-type) + (declare (ignore db-type) + nil)) + (:documentation "NIL [default] if database-type supports auto-incrementing columns.")) + ;;; Large objects support (Marc Battyani) (defgeneric database-create-large-object (database) @@ -421,6 +425,20 @@ of TYPE_NAME (keyword) PRECISION SCALE NULLABLE.") nil) (:documentation "Free the resources of a prepared statement.")) +(defgeneric database-acquire-from-conn-pool (database) + (:documentation "Acquire a database connection from the pool. This +is a chance to test the connection for validity before returning it to +the user. If this function returns NIL or throws an error that +database connection is considered bad and we make a new one. + +Database objects have a chance to specialize, otherwise the default +method uses the database-underlying-type and tries to do something +appropriate.")) + +(defgeneric database-release-to-conn-pool (database) + (:documentation "Chance for the database to cleanup before it is + returned to the connection pool.")) + ;; Checks for closed database (defmethod database-disconnect :before ((database database))