* Separated db-interface and conditions from sql/sql.cl
* Improved foreign library loading testing
+
+ * interfaces/postgresql/postgresql-api.cl
+ Added PQisBusy function
+
+ * Optimizes :types processing if value is nil
27 Mar 2002 Kevin Rosenberg (kevin@rosenberg.net)
* interfaces/postgresql-socket/postgresql-socket-api.cl:
;;;; Original code by Pierre R. Mai
;;;; Date Started: Feb 2002
;;;;
-;;;; $Id: mysql-sql.cl,v 1.15 2002/03/27 12:09:39 kevin Exp $
+;;;; $Id: mysql-sql.cl,v 1.16 2002/03/29 09:37:24 kevin Exp $
;;;;
;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;; and Copyright (c) 1999-2001 by Pierre R. Mai
(nreverse new-types)))
(defun canonicalize-types (types num-fields res-ptr)
- (let ((auto-list (make-type-list-for-auto num-fields res-ptr)))
- (cond
- ((listp types)
- (canonicalize-type-list types auto-list))
- ((eq types :auto)
- auto-list)
- (t
- nil))))
+ (if (null types)
+ nil
+ (let ((auto-list (make-type-list-for-auto num-fields res-ptr)))
+ (cond
+ ((listp types)
+ (canonicalize-type-list types auto-list))
+ ((eq types :auto)
+ auto-list)
+ (t
+ nil)))))
(defmethod database-initialize-database-type ((database-type (eql :mysql)))
t)
;;;; Original code by Pierre R. Mai
;;;; Date Started: Feb 2002
;;;;
-;;;; $Id: postgresql-socket-sql.cl,v 1.9 2002/03/29 08:28:14 kevin Exp $
+;;;; $Id: postgresql-socket-sql.cl,v 1.10 2002/03/29 09:37:24 kevin Exp $
;;;;
;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;; and Copyright (c) 1999-2001 by Pierre R. Mai
t))))
(defun canonicalize-types (types cursor)
- (let ((auto-list (make-type-list-for-auto cursor)))
- (cond
- ((listp types)
- (canonicalize-type-list types auto-list))
- ((eq types :auto)
- auto-list)
- (t
- nil))))
+ (if (null types)
+ nil
+ (let ((auto-list (make-type-list-for-auto cursor)))
+ (cond
+ ((listp types)
+ (canonicalize-type-list types auto-list))
+ ((eq types :auto)
+ auto-list)
+ (t
+ nil)))))
(defun canonicalize-type-list (types auto-list)
"Ensure a field type list meets expectations.
;;;; Original code by Pierre R. Mai
;;;; Date Started: Feb 2002
;;;;
-;;;; $Id: postgresql-api.cl,v 1.4 2002/03/27 08:09:25 kevin Exp $
+;;;; $Id: postgresql-api.cl,v 1.5 2002/03/29 09:37:24 kevin Exp $
;;;;
;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;; and Copyright (c) 1999-2001 by Pierre R. Mai
((res pgsql-result))
:module "postgresql"
:returning :void)
+
+(declaim (inline PQisBusy))
+(uffi:def-function ("PQisBusy" PQisBusy)
+ ((conn pgsql-conn))
+ :module "postgresql"
+ :returning :int)
;;;; Programmer: Kevin M. Rosenberg
;;;; Date Started: Feb 2002
;;;;
-;;;; $Id: postgresql-package.cl,v 1.5 2002/03/27 08:09:25 kevin Exp $
+;;;; $Id: postgresql-package.cl,v 1.6 2002/03/29 09:37:24 kevin Exp $
;;;;
;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;;
#:PQgetlength
#:PQgetisnull
#:PQclear
+ #:PQisBusy
)
(:documentation "This is the low-level interface to PostgreSQL."))
;;;; Original code by Pierre R. Mai
;;;; Date Started: Feb 2002
;;;;
-;;;; $Id: postgresql-sql.cl,v 1.11 2002/03/27 12:09:39 kevin Exp $
+;;;; $Id: postgresql-sql.cl,v 1.12 2002/03/29 09:37:24 kevin Exp $
;;;;
;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;; and Copyright (c) 1999-2001 by Pierre R. Mai
(nreverse new-types)))
(defun canonicalize-types (types num-fields res-ptr)
- (let ((auto-list (make-type-list-for-auto num-fields res-ptr)))
- (cond
- ((listp types)
- (canonicalize-type-list types auto-list))
- ((eq types :auto)
- auto-list)
- (t
- nil))))
+ (if (null types)
+ nil
+ (let ((auto-list (make-type-list-for-auto num-fields res-ptr)))
+ (cond
+ ((listp types)
+ (canonicalize-type-list types auto-list))
+ ((eq types :auto)
+ auto-list)
+ (t
+ nil)))))
(defun tidy-error-message (message)
(unless (stringp message)